Browse Source

Set ALLOWED_HOSTS from .env

master
PCoder 3 years ago
parent
commit
273a1acf01
  1. 3
      .env.sample
  2. 4
      ungleichotpserver/settings.py

3
.env.sample

@ -1,3 +1,4 @@
SECRET_KEY=ldskjflkdsnejnjsdnf
DEBUG=False
ENABLE_DEBUG_LOG=True
ENABLE_DEBUG_LOG=True
ALLOWED_HOSTS=localhost,.ungleich.ch

4
ungleichotpserver/settings.py

@ -132,9 +132,7 @@ DEBUG_DATABASES = {
}
DEBUG = config('DEBUG', False, cast=bool)
ALLOWED_HOSTS = [
".ungleich.ch"
]
ALLOWED_HOSTS = config('ALLOWED_HOSTS', default='localhost', cast=Csv)
DATABASES = {
'default': {

Loading…
Cancel
Save