feat: pass CSRF_TRUSTED_ORIGINS env to settings (#2656)
Some checks are pending
Release Charts / release (push) Waiting to run
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run

Allow to manage djangos CSRF_TRUSTED_ORIGINS by environment variables.

Closes #2655
This commit is contained in:
Yohan Boniface 2025-04-16 12:34:49 +02:00 committed by GitHub
commit 6945a5e867
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,6 +19,7 @@ env = environ.Env()
INTERNAL_IPS = env.list("INTERNAL_IPS", default=["127.0.0.1"])
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["*"])
CSRF_TRUSTED_ORIGINS = env.list("CSRF_TRUSTED_ORIGINS", default=[])
ADMINS = tuple(parseaddr(email) for email in env.list("ADMINS", default=[]))
ASGI_APPLICATION = "umap.asgi.application"