Re-introduce Django CSRF middleware

It is a security issue not to include the Django CSRF middle. Also, since we
don't have a reason to alter the Django middleware list and order, we should
use the same list.
This commit is contained in:
Sunil Mohan Adapa 2014-08-17 19:29:31 +05:30
parent 96aa493992
commit 65cdcb1bc3

View File

@ -175,10 +175,12 @@ def configure_django():
LOGIN_REDIRECT_URL='apps:index',
LOGOUT_URL='lib:logout',
MIDDLEWARE_CLASSES=(
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'modules.first_boot.middleware.FirstBootMiddleware',
),
ROOT_URLCONF='urls',