configure csrf trusted origins
All checks were successful
Build and Deploy Staging / build (push) Successful in 47s
Build and Deploy Staging / deploy (push) Successful in 7s

This commit is contained in:
Tobias Brunner 2025-03-21 14:59:37 +01:00
parent 65d60bf17c
commit 99a68c1578
No known key found for this signature in database

View file

@ -26,6 +26,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
ALLOWED_HOSTS = []
if allowed_hosts := os.environ.get("SERVALA_ALLOWED_HOSTS"):
ALLOWED_HOSTS = allowed_hosts.split(",")
CSRF_TRUSTED_ORIGINS = [f"https://{h}" for h in ALLOWED_HOSTS]
db_name = os.environ.get("SERVALA_DB_NAME", "")
if SERVALA_ENVIRONMENT == "development" and not db_name: