diff --git a/app/settings/settings.py b/app/settings/settings.py index dcbc284..4e80371 100644 --- a/app/settings/settings.py +++ b/app/settings/settings.py @@ -31,9 +31,12 @@ def load_insecure_key(): SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY") or load_insecure_key() ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", "*").split(" ") +CSRF_TRUSTED_ORIGINS = list(f"https://{x.replace('https://', '')}" for x in os.environ.get("DJANGO_ALLOWED_HOSTS", "*").split(" ")) SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") -print(f"{DEBUG=}, {ALLOWED_HOSTS=}") +print(f"{DEBUG=}") +print(f"{ALLOWED_HOSTS=}") +print(f"{CSRF_TRUSTED_ORIGINS=}") # Application definition