Skip to content

Commit

Permalink
Merge pull request #1668 from airqo-platform/inventory-CORS-fix
Browse files Browse the repository at this point in the history
CORS origin has been added to the sysyem
  • Loading branch information
Baalmart authored Nov 13, 2023
2 parents b69837a + 81c3770 commit 5241eff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions inventory/Inventory/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
# Application definition

INSTALLED_APPS = [
'corsheaders', # CORS HEADERS
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
Expand All @@ -58,6 +59,7 @@
]

MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware', # CORS HEADERS
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
Expand All @@ -68,6 +70,11 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

CORS_ALLOWED_ORIGINS = [
"https://staging-platform.airqo.net",
"https://platform.airqo.net",
]

ROOT_URLCONF = 'Inventory.urls'

TEMPLATES = [
Expand Down
1 change: 1 addition & 0 deletions inventory/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ zipp==3.16.2
django-simple-history==3.3.0
python-decouple==3.8
python-dotenv==1.0.0
django-cors-headers==4.3.0

0 comments on commit 5241eff

Please sign in to comment.