Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #470 from cmc333333/security
Browse files Browse the repository at this point in the history
Add more middleware, security settings
  • Loading branch information
tadhg-ohiggins authored Oct 13, 2016
2 parents 8957788 + 3fd55d2 commit bee017a
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions regulations/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,32 @@
]


# Note order:
# https://docs.djangoproject.com/en/1.8/topics/cache/#the-per-site-cache
# Order from
# https://docs.djangoproject.com/en/1.9/ref/middleware/#middleware-ordering
MIDDLEWARE_CLASSES = (
'django.middleware.security.SecurityMiddleware',
'django.middleware.cache.UpdateCacheMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
)

SECURE_BROWSER_XSS_FILTER = True
SECURE_CONTENT_TYPE_NOSNIFF = True

ROOT_URLCONF = 'regulations.urls'

INSTALLED_APPS = (
# Note: no admin
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'regulations.apps.RegulationsConfig',
)
Expand Down

0 comments on commit bee017a

Please sign in to comment.