diff --git a/ecommerce/settings/base.py b/ecommerce/settings/base.py index cbb5f68e193..272309f6647 100644 --- a/ecommerce/settings/base.py +++ b/ecommerce/settings/base.py @@ -377,6 +377,7 @@ 'rest_framework_swagger', 'django_sites_extensions', 'corsheaders', + 'allowedsites', ] # Apps specific to this project go here. diff --git a/ecommerce/settings/production.py b/ecommerce/settings/production.py index ef2d57d52a3..a8d0dca51d8 100644 --- a/ecommerce/settings/production.py +++ b/ecommerce/settings/production.py @@ -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' + ) +) diff --git a/requirements/base.txt b/requirements/base.txt index 28172533e7a..66c684d9215 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -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