Skip to content

Instantly share code, notes, and snippets.

@kesnel
Last active October 18, 2021 20:56
Show Gist options
  • Save kesnel/76c2b10e59f9352056b62e89af90bd24 to your computer and use it in GitHub Desktop.
Save kesnel/76c2b10e59f9352056b62e89af90bd24 to your computer and use it in GitHub Desktop.
Middleware with whitenoise
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'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',
# WhiteNoise
'whitenoise.middleware.WhiteNoiseMiddleware',
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment