Files
IoT_PreTester_V46_Demo/django_project/IoTAnalyzer/authentication.py
T
2026-08-19 08:04:59 +02:00

14 lines
451 B
Python

"""Session authentication adapted to the localhost-only demo API.
State-changing requests remain protected by authenticated session cookies and a
strict CORS allow-list. The separate CSRF check is disabled because the frontend
and API use different localhost ports.
"""
from rest_framework.authentication import SessionAuthentication
class DemoSessionAuthentication(SessionAuthentication):
def enforce_csrf(self, request):
return None