Skip to content

Commit

Permalink
Look up DJANGO_ALLOWED_HOSTS env
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed Apr 13, 2017
1 parent ceea46f commit d41c62c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ USER archivematica
RUN env \
DJANGO_SETTINGS_MODULE=storage_service.settings.local \
DJANGO_SECRET_KEY=12345 \
SS_DB_HOST=foobar \
SS_DB_USER=foobar \
SS_DB_PASSWORD=foobar \
SS_DB_NAME=foobar \
DJANGO_ALLOWED_HOSTS=127.0.0.1 \
SS_DB_URL=mysql://ne:ver@min/d \
/src/storage_service/manage.py collectstatic --noinput --clear

EXPOSE 8000
Expand Down
2 changes: 1 addition & 1 deletion storage_service/storage_service/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def get_env_variable(var_name):
########## SITE CONFIGURATION
# Hosts/domain names that are valid for this site
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = []
ALLOWED_HOSTS = get_env_variable('DJANGO_ALLOWED_HOSTS').split(',')
########## END SITE CONFIGURATION


Expand Down
4 changes: 0 additions & 4 deletions storage_service/storage_service/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ def get_env_setting(setting):
error_msg = "Set the %s env variable" % setting
raise ImproperlyConfigured(error_msg)

########## HOST CONFIGURATION
# See: https://docs.djangoproject.com/en/1.5/releases/1.5/#allowed-hosts-required-in-production
ALLOWED_HOSTS = ['*']
########## END HOST CONFIGURATION

########## EMAIL CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
Expand Down

0 comments on commit d41c62c

Please sign in to comment.