manosim / manosim/django-rest-framework-docs
DRF Docs LiveAPI doesn't pass Django CSRF token
- Dominant language
- Python
- Stars
- 641
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
In developing with DRF Docs, I gave a couple of internal business users the Live API links in order to do manual testing. In their testing POST, PUT, and PATCH methods, they were receiving an error message due to the missing CSRF token.
Is there a reason DRF Docs doesn't automatically pass this data if it exists?
ala a potential solution here:
https://github.com/jroblak/django-rest-framework-docs/blob/master/rest_framework_docs/static/rest_framework_docs/js/components/liveapi.js
Contributor guide
Research direction
Start with rest_framework_docs/static/rest_framework_docs/js/components/liveapi.js and trace how Live API POST, PUT, and PATCH requests are sent. Reproduce the CSRF failure in a Django REST Framework Docs setup, then verify that requests succeed when a CSRF token exists without breaking other Live API methods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100