Skip to content

Commit 8e8091a

Browse files
author
karmaking
committed
add CORS feature
1 parent 4aa032d commit 8e8091a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

apimanager/apimanager/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
'django.contrib.sessions',
4545
'django.contrib.messages',
4646
'django.contrib.staticfiles',
47+
'corsheaders',
4748
'bootstrap',
4849
'bootstrap_datepicker_plus',
4950
'mathfilters',
@@ -86,6 +87,7 @@
8687
'django.contrib.messages.middleware.MessageMiddleware',
8788
'django.middleware.clickjacking.XFrameOptionsMiddleware',
8889
# 'django.middleware.cache.FetchFromCacheMiddleware',
90+
'corsheaders.middleware.CorsMiddleware'
8991
]
9092

9193
#cache the view page, we set 60s = 1m,

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ matplotlib
1010
django-bootstrap-datepicker-plus
1111
django-mathfilters
1212
django-bootstrap
13-
django-csp
13+
django-csp
14+
django-cors-headers

0 commit comments

Comments
 (0)