From 7f8468ecdb2bc2820755e9b4bf9f213f1e8d0908 Mon Sep 17 00:00:00 2001 From: scragly <29337040+scragly@users.noreply.github.com> Date: Sat, 28 Sep 2019 22:40:14 +1000 Subject: Support internal docker network DNS resolution & dev ALLOWED_HOSTS env var. --- pydis_site/settings.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'pydis_site/settings.py') diff --git a/pydis_site/settings.py b/pydis_site/settings.py index 3f6cd94a..4534f54b 100644 --- a/pydis_site/settings.py +++ b/pydis_site/settings.py @@ -30,12 +30,19 @@ DEBUG = env('DEBUG') # SECURITY WARNING: keep the secret key used in production secret! if DEBUG: - ALLOWED_HOSTS = [ - 'pythondiscord.local', - 'admin.pythondiscord.local', - 'api.pythondiscord.local', - 'staff.pythondiscord.local', - ] + ALLOWED_HOSTS = env.list( + 'ALLOWED_HOSTS', + default=[ + 'pythondiscord.local', + 'api.pythondiscord.local', + 'admin.pythondiscord.local', + 'staff.pythondiscord.local', + 'web', + 'api.web', + 'admin.web', + 'staff.web' + ] + ) SECRET_KEY = secrets.token_urlsafe(32) elif 'CI' in os.environ: -- cgit v1.2.3