From 820f04cc01e60ea514fe8aa8e25067dc75188bbc Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 25 Aug 2023 21:03:55 +0200 Subject: [PATCH] settings: properly order middleware and and gzip --- spejstore/settings.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spejstore/settings.py b/spejstore/settings.py index d1ad172..460d662 100644 --- a/spejstore/settings.py +++ b/spejstore/settings.py @@ -60,15 +60,16 @@ INSTALLED_APPS = [ ] MIDDLEWARE = [ - "django.middleware.cache.UpdateCacheMiddleware", "django.middleware.security.SecurityMiddleware", "whitenoise.middleware.WhiteNoiseMiddleware", + "django.middleware.cache.UpdateCacheMiddleware", + "django.middleware.gzip.GZipMiddleware", "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", + "django.contrib.messages.middleware.MessageMiddleware", "social_django.middleware.SocialAuthExceptionMiddleware", "django.middleware.cache.FetchFromCacheMiddleware", ]