Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds module for dynamic ALLOWED_HOSTS #34

Open
wants to merge 8 commits into
base: develop-multisite
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ecommerce/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@
'rest_framework_swagger',
'django_sites_extensions',
'corsheaders',
'allowedsites',
]

# Apps specific to this project go here.
Expand Down
9 changes: 9 additions & 0 deletions ecommerce/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,12 @@ def get_env_setting(setting):

# Edly configuration
EDLY_COOKIE_SECRET_KEY = config_from_yaml.get('EDLY_COOKIE_SECRET_KEY', EDLY_COOKIE_SECRET_KEY)

from allowedsites import AllowedSites
ALLOWED_HOSTS = AllowedSites(defaults=(
'panel.edly.io',
'panel.backend.edly.io',
'.edly.io',
'ecommerce.healthcheck.local'
)
)
1 change: 1 addition & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,4 @@ unidecode==0.4.21 # via django-oscar
uritemplate==3.0.0 # via coreapi
urllib3==1.25.6 # via requests
zeep==2.1.1
django-allowedsites==0.1.0