configure csrf trusted origins
This commit is contained in:
parent
65d60bf17c
commit
99a68c1578
1 changed files with 1 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue