Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

django csrf failed

from rest_framework.authentication import SessionAuthentication, BasicAuthentication 

class CsrfExemptSessionAuthentication(SessionAuthentication):

    def enforce_csrf(self, request):
        return  # To not perform the csrf check previously happening
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #django #csrf #failed
ADD COMMENT
Topic
Name
9+8 =