aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-09-07 23:29:40 +0200
committerGravatar Johannes Christ <[email protected]>2018-09-07 23:29:40 +0200
commita3556f0040d924ad3423de855cab901ed7d0deb8 (patch)
tree9f95f19e48c94875dcc660180149dd71e94a3320
parentOnly push `nging` on `master` and `django`. (diff)
Allow configuring allowed hosts with env var.
-rw-r--r--pysite/settings.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/pysite/settings.py b/pysite/settings.py
index 6bcf9a53..a3aecf06 100644
--- a/pysite/settings.py
+++ b/pysite/settings.py
@@ -46,13 +46,16 @@ elif 'CI' in os.environ:
SECRET_KEY = "{©ø¬½.Þ7&Ñ`Q^Kº*~¢j<wxß¾±ðÛJ@q"
else:
- ALLOWED_HOSTS = [
- 'pythondiscord.com',
- 'admin.pythondiscord.com',
- 'api.pythondiscord.com',
- 'staff.pythondiscord.local',
- 'wiki.pythondiscord.local'
- ]
+ ALLOWED_HOSTS = env.list(
+ 'ALLOWED_HOSTS',
+ default=[
+ 'pythondiscord.com',
+ 'admin.pythondiscord.com',
+ 'api.pythondiscord.com',
+ 'staff.pythondiscord.local',
+ 'wiki.pythondiscord.local'
+ ]
+ )
SECRET_KEY = env('SECRET_KEY')