Skip to content

Commit 71a36cc

Browse files
author
Michael Hiiva
authored
Merge pull request #149 from EarthSchlange/add_env_domain
Added hosts via environment.
2 parents b69d566 + 8dfcf1f commit 71a36cc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

agagd/agagd/settings/base.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99

1010
MANAGERS = ADMINS
1111

12-
ALLOWED_HOSTS = ['localhost', 'test.agagd.usgo.org', 'agagd.usgo.org', 'a.agagd.usgo.org']
12+
# Allow only the default ALLOWED_HOSTS ['.localhost', '127.0.0.1', '[::1]'].
13+
ALLOWED_HOSTS = []
14+
15+
# Only one allowed host is expected here.
16+
if os.getenv('ALLOWED_HOSTS') != None:
17+
ALLOWED_HOSTS.append(os.getenv('ALLOWED_HOSTS'))
1318

1419
# Local time zone for this installation. Choices can be found here:
1520
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name

0 commit comments

Comments
 (0)