Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pbansal
Test-Docker
Commits
6219cb32
Commit
6219cb32
authored
Jun 04, 2020
by
Jaroslaw Surkont
Browse files
Load ALLOWED_HOSTS from env
Close #1
parent
4e5eaa8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Docker/.env.template
View file @
6219cb32
...
...
@@ -46,3 +46,4 @@ CATHSMAPI_CODEBASE=fromlocal
# the Git repository
CATHSMAPI_GITTAG=v0.0.1
ALLOWED_HOSTS = "localhost,127.0.0.1"
\ No newline at end of file
cathapi/settings/base.py
View file @
6219cb32
...
...
@@ -45,8 +45,7 @@ del secret_files
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG
=
False
ALLOWED_HOSTS
=
[
"api01.cathdb.info"
,
".cathdb.info"
,
"orengoapi01"
,
"localhost"
,
"127.0.0.1"
,
"127.0.0.1:8000"
,
"0.0.0.0"
,
"192.168.99.1"
,
"131.152.84.4"
,
"172.17.0.1"
,
"192.168.122.1"
]
ALLOWED_HOSTS
=
os
.
environ
.
get
(
'ALLOWED_HOSTS'
,
'localhost'
).
split
(
','
)
# SENTRY (logging)
...
...
cathapi/settings/prod.py
View file @
6219cb32
...
...
@@ -23,10 +23,6 @@ DATABASES = {
}
}
# allowed hosts
ALLOWED_HOSTS
=
[
'.cathdb.info'
,
'orengoapi01'
]
# CACHES = {
# "default": {
# "BACKEND": "django_redis.cache.RedisCache",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment