build 4.6 Demo
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
"""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
|
||||
Reference in New Issue
Block a user