Fix: docker csrf_trusted_origins

This commit is contained in:
Stepan Zhukovsky 2023-08-31 01:23:25 +09:00
parent 0834474a59
commit 20aa084c90

View File

@ -22,6 +22,10 @@ DEBUG = env('DEBUG')
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["*"]) ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["*"])
# https://docs.djangoproject.com/en/4.2/ref/settings/#csrf-trusted-origins
if not DEBUG:
CSRF_TRUSTED_ORIGINS = env.list("CSRF_TRUSTED_ORIGINS", default=[])
# TODO: required for docker image # TODO: required for docker image
# CSRF_TRUSTED_ORIGINS = env.list("CSRF_TRUSTED_ORIGINS", default=["*"]) # CSRF_TRUSTED_ORIGINS = env.list("CSRF_TRUSTED_ORIGINS", default=["*"])