Skip to content

Commit

Permalink
Remove useless ALLOWED_HOSTS values
Browse files Browse the repository at this point in the history
The port number is not included in the hostname when checking the list
of allowed values.
We also add the "lms"/"cms" values for interaction with the API from
within the internal docker network.
  • Loading branch information
regisb committed Jul 7, 2019
1 parent 90650b6 commit 45a573d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions tutor/templates/apps/openedx/settings/cms/production.py
Expand Up @@ -7,13 +7,10 @@

ALLOWED_HOSTS = [
ENV_TOKENS.get("CMS_BASE"),
"cms",
"127.0.0.1",
"localhost",
"studio.localhost",
"127.0.0.1:8000",
"localhost:8000",
"127.0.0.1:8001",
"localhost:8001",
]

DEFAULT_FROM_EMAIL = ENV_TOKENS["CONTACT_EMAIL"]
Expand Down
4 changes: 1 addition & 3 deletions tutor/templates/apps/openedx/settings/lms/production.py
Expand Up @@ -8,12 +8,10 @@
ALLOWED_HOSTS = [
ENV_TOKENS.get("LMS_BASE"),
FEATURES["PREVIEW_LMS_BASE"],
"lms",
"127.0.0.1",
"localhost",
"preview.localhost",
"127.0.0.1:8000",
"localhost:8000",
"preview.localhost:8000",
]

# Required to display all courses on start page
Expand Down

0 comments on commit 45a573d

Please sign in to comment.