What is the sensible behaviour here? #8435
Replies: 2 comments 1 reply
-
Didn't get your point |
Beta Was this translation helpful? Give feedback.
-
From what I understand, the more sensible behavior here is allowing all requests to not have a CSRF token except for session-based requests. This is due to the session-based requests usually having access to the generated CSRF token, while cross-domain doesn't. This behavior is documented on AJAX, CSRF & CORS:
And the corresponding code:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Source: https://www.django-rest-framework.org/tutorial/1-serialization/
Beta Was this translation helpful? Give feedback.
All reactions