Created
November 12, 2015 10:46
-
-
Save eugena/c5c709c75daaf0ffaa7b to your computer and use it in GitHub Desktop.
SessionAuthentication without csrf token check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rest_framework.authentication import SessionAuthentication | |
class CsrfExemptSessionAuthentication(SessionAuthentication): | |
""" | |
SessionAuthentication without csrf token check | |
""" | |
def enforce_csrf(self, request): | |
""" | |
Not performing csrf token check | |
""" | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment