Skip to content

Commit

Permalink
add CORS feature
Browse files Browse the repository at this point in the history
  • Loading branch information
karmaking committed Jan 10, 2025
1 parent 4aa032d commit 8e8091a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apimanager/apimanager/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'corsheaders',
'bootstrap',
'bootstrap_datepicker_plus',
'mathfilters',
Expand Down Expand Up @@ -86,6 +87,7 @@
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
# 'django.middleware.cache.FetchFromCacheMiddleware',
'corsheaders.middleware.CorsMiddleware'
]

#cache the view page, we set 60s = 1m,
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ matplotlib
django-bootstrap-datepicker-plus
django-mathfilters
django-bootstrap
django-csp
django-csp
django-cors-headers

0 comments on commit 8e8091a

Please sign in to comment.