Can now configure allowed host in all settings

merge-requests/154/head
Eliot Berriot 2018-02-18 14:28:44 +01:00
rodzic c0724d3cb4
commit 2f8a026afa
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
4 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -20,6 +20,7 @@ test_api:
paths:
- "$PIP_CACHE_DIR"
variables:
DJANGO_ALLOWED_HOSTS: "localhost"
DATABASE_URL: "postgresql://postgres@postgres/postgres"
before_script:

Wyświetl plik

@ -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 = (

Wyświetl plik

@ -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

Wyświetl plik

@ -10,6 +10,7 @@ services:
volumes:
- .:/app
environment:
- "DJANGO_ALLOWED_HOSTS=localhost"
- "DATABASE_URL=postgresql://postgres@postgres/postgres"
postgres:
image: postgres