Skip to content

Commit

Permalink
fix CSRF/CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
karmaking committed Jan 10, 2025
1 parent a1fe695 commit 8757ce5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions apimanager/apimanager/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
#'corsheaders',
'bootstrap',
'bootstrap_datepicker_plus',
'mathfilters',
Expand Down Expand Up @@ -87,7 +86,6 @@
'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 Expand Up @@ -284,7 +282,7 @@
CSRF_COOKIE_HTTPONLY = True
CSRF_COOKIE_SECURE = True

#SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

# Paths on API_HOST to OAuth
OAUTH_TOKEN_PATH = '/oauth/initiate'
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ matplotlib
django-bootstrap-datepicker-plus
django-mathfilters
django-bootstrap
django-csp
#django-cors-headers
django-csp

0 comments on commit 8757ce5

Please sign in to comment.