aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2019-04-19 14:23:34 +0100
committerGravatar Gareth Coles <[email protected]>2019-04-19 14:23:34 +0100
commit94e0559bc45d7a1ef35f0850ab65474665b2a4ab (patch)
tree0c4f1293ce8e9207475cdf32a11455d8f65c817e /pydis_site
parentContinued cleanup (diff)
Settings: PARENT_HOST will be added to ALLOWED_HOSTS in debug mode
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/settings.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pydis_site/settings.py b/pydis_site/settings.py
index b938b36d..0bd4957b 100644
--- a/pydis_site/settings.py
+++ b/pydis_site/settings.py
@@ -202,6 +202,11 @@ DEFAULT_HOST = 'home'
if DEBUG:
PARENT_HOST = env('PARENT_HOST', default='pythondiscord.local:8000')
+
+ if ":" in PARENT_HOST:
+ ALLOWED_HOSTS.append(PARENT_HOST.split(":", 1)[0])
+ else:
+ ALLOWED_HOSTS.append(PARENT_HOST)
else:
PARENT_HOST = env('PARENT_HOST', default='pythondiscord.com')