fix(deploy): add use-x-forwarded-host
This commit is contained in:
parent
61f1457453
commit
cb46fce3ce
@ -17,6 +17,7 @@ class Settings(BaseSettings):
|
|||||||
allowed_hosts: list[str] = []
|
allowed_hosts: list[str] = []
|
||||||
installed_apps: list[str] = []
|
installed_apps: list[str] = []
|
||||||
api_secret: str = "selecta-secret"
|
api_secret: str = "selecta-secret"
|
||||||
|
force_script_name: str = ""
|
||||||
|
|
||||||
db_engine: str = "django.db.backends.postgresql"
|
db_engine: str = "django.db.backends.postgresql"
|
||||||
db_name: str = "selecta-highscore"
|
db_name: str = "selecta-highscore"
|
||||||
|
|||||||
@ -35,6 +35,9 @@ INSTALLED_APPS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
API_SECRET = env.api_secret
|
API_SECRET = env.api_secret
|
||||||
|
USE_X_FORWARDED_HOST = True
|
||||||
|
FORCE_SCRIPT_NAME = env.force_script_name
|
||||||
|
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
"django.middleware.security.SecurityMiddleware",
|
"django.middleware.security.SecurityMiddleware",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user