Allow staging/production hostnames

This commit is contained in:
2026-05-09 13:29:32 +02:00
parent 781a873ac3
commit 0d721e1f03

View File

@@ -36,6 +36,18 @@ INSTALLED_APPS = [
"mandelstudio", "mandelstudio",
] + INSTALLED_APPS ] + INSTALLED_APPS
# Ensure the canonical staging / production hostnames are accepted by Django.
# (Staging uses the welkomstaging domain; production uses mandelblog.com.)
_extra_allowed_hosts = [
"mandelstudio.welkombij.mandelblog.com",
"www.mandelblog.com",
"mandelblog.com",
]
if "ALLOWED_HOSTS" in globals():
for _host in _extra_allowed_hosts:
if _host not in ALLOWED_HOSTS:
ALLOWED_HOSTS.append(_host)
# Never allow demo-data plugins in this production project context. # Never allow demo-data plugins in this production project context.
def _is_demo_data_app(app_label: str) -> bool: def _is_demo_data_app(app_label: str) -> bool: