Added csrf trusted origins setting
This commit is contained in:
parent
3763b2a3d3
commit
321ca3bf6a
3 changed files with 3 additions and 0 deletions
Binary file not shown.
Binary file not shown.
|
|
@ -170,5 +170,8 @@ if origins:=os.getenv('DJANGO_CORS_ALLOWED_ORIGINS'):
|
|||
CORS_ALLOWED_ORIGINS = origins.split(',')
|
||||
CORS_ALLOW_CREDENTIALS = True
|
||||
|
||||
if trusted_origins:=os.getenv('DJANGO_CSRF_TRUSTED_ORIGINS'):
|
||||
CSRF_TRUSTED_ORIGINS = [origin.strip() for origin in trusted_origins.split(',')]
|
||||
|
||||
if DEBUG:
|
||||
SECURE_CROSS_ORIGIN_OPENER_POLICY = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue