Skip to content
Snippets Groups Projects
Verified Commit 2f8a026a authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Can now configure allowed host in all settings

parent c0724d3c
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ test_api:
paths:
- "$PIP_CACHE_DIR"
variables:
DJANGO_ALLOWED_HOSTS: "localhost"
DATABASE_URL: "postgresql://postgres@postgres/postgres"
before_script:
......
......@@ -23,6 +23,10 @@ try:
env.read_env(ROOT_DIR.file('.env'))
except FileNotFoundError:
pass
ALLOWED_HOSTS = env.list('DJANGO_ALLOWED_HOSTS')
# APP CONFIGURATION
# ------------------------------------------------------------------------------
DJANGO_APPS = (
......
......@@ -54,7 +54,6 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# ------------------------------------------------------------------------------
# Hosts/domain names that are valid for this site
# See https://docs.djangoproject.com/en/1.6/ref/settings/#allowed-hosts
ALLOWED_HOSTS = env.list('DJANGO_ALLOWED_HOSTS')
CSRF_TRUSTED_ORIGINS = ALLOWED_HOSTS
# END SITE CONFIGURATION
......
......@@ -10,6 +10,7 @@ services:
volumes:
- .:/app
environment:
- "DJANGO_ALLOWED_HOSTS=localhost"
- "DATABASE_URL=postgresql://postgres@postgres/postgres"
postgres:
image: postgres
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment