From 17ccfcd30bcb9bec5d5317cf5089f6ca792f49d9 Mon Sep 17 00:00:00 2001 From: erichhasl Date: Sat, 18 Nov 2017 00:59:44 +0100 Subject: [PATCH] fix allowed hosts --- web_dev/sas_web/sas_web/settings.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web_dev/sas_web/sas_web/settings.py b/web_dev/sas_web/sas_web/settings.py index 7176653..f9f17e4 100644 --- a/web_dev/sas_web/sas_web/settings.py +++ b/web_dev/sas_web/sas_web/settings.py @@ -26,7 +26,11 @@ SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = os.environ.get('DJANGO_ALLOWED_HOST', '').split(",") +allowed = os.environ.get('DJANGO_ALLOWED_HOST', None) +if allowed is not None: + ALLOWED_HOSTS = allowed.split(",") +else: + ALLOWED_HOSTS = [] # Define media paths e.g. for image storage MEDIA_URL = '/media/'