use django's clickjacking protection middleware
This commit is contained in:
parent
dea3848b36
commit
b6db7a33d8
@ -119,6 +119,12 @@ CSRF protection
|
||||
We use Django's CSRF protection middleware.
|
||||
|
||||
|
||||
Clickjacking protection
|
||||
=======================
|
||||
|
||||
We use Django's clickjacking protection middleware.
|
||||
|
||||
|
||||
XSS protection
|
||||
==============
|
||||
|
||||
|
@ -117,8 +117,7 @@ MIDDLEWARE_CLASSES = (
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'social.apps.django_app.middleware.SocialAuthExceptionMiddleware',
|
||||
# Uncomment the next line for simple clickjacking protection:
|
||||
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
)
|
||||
|
||||
TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + (
|
||||
@ -232,6 +231,8 @@ ACCOUNT_ACTIVATION_DAYS = 7
|
||||
|
||||
LOGIN_REDIRECT_URL = '/overview/'
|
||||
|
||||
X_FRAME_OPTIONS = 'DENY' # for clickjacking middleware
|
||||
|
||||
CSRF_FAILURE_VIEW = 'nsupdate.main.views.csrf_failure_view'
|
||||
|
||||
# Settings for CSRF cookie.
|
||||
|
Loading…
x
Reference in New Issue
Block a user