feat: add secure proxy configuration for http to https

This commit is contained in:
ramvignesh-b
2026-04-28 18:02:27 +05:30
parent f522a369ab
commit 8a9ded42b5
+3
View File
@@ -25,9 +25,12 @@ env_file = os.environ.get("PIKU_ENV_FILE", os.path.join(BASE_DIR.parent, ".env")
if os.path.exists(env_file):
environ.Env.read_env(env_file, overwrite=False)
# Security Settings
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=["127.0.0.1"])
ALLOWED_HOSTS.append(env("FRONTEND_DOMAIN", default="127.0.0.1"))
ALLOWED_HOSTS.append(env("BACKEND_DOMAIN", default="127.0.0.1"))
# NOTE: Set to forward https when using reverse proxy
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
CSRF_TRUSTED_ORIGINS = env.list("CSRF_TRUSTED_ORIGINS", default=[])