fix allowed hosts

This commit is contained in:
erichhasl
2017-11-18 00:59:44 +01:00
parent 7c1c105fa6
commit 17ccfcd30b
+5 -1
View File
@@ -26,7 +26,11 @@ SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY',
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True 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 # Define media paths e.g. for image storage
MEDIA_URL = '/media/' MEDIA_URL = '/media/'