No images in this repository’s iceberg at this time
Download raw (343 bytes)
from rest_framework.authentication import SessionAuthentication, BasicAuthentication # cf <https://stackoverflow.com/questions/30871033/django-rest-framework-remove-csrf> class CsrfExemptSessionAuthentication(SessionAuthentication): def enforce_csrf(self, request): return # To not perform the csrf check previously happening