Skip to content

Commit

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

#cache the view page, we set 60s = 1m,
Expand Down Expand Up @@ -284,7 +284,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
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ django-bootstrap-datepicker-plus
django-mathfilters
django-bootstrap
django-csp
django-cors-headers
#django-cors-headers

0 comments on commit a1fe695

Please sign in to comment.