Allow staging/production hostnames
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user