1
Fork 0

Brotli and gzip encode responses

This commit is contained in:
Jake Howard 2020-05-10 15:12:27 +01:00
parent 6599246439
commit 922a982f09
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 3 additions and 0 deletions

View file

@ -5,3 +5,4 @@ brotli==1.0.7
django-environ==0.4.5 django-environ==0.4.5
gunicorn ==20.0.4 gunicorn ==20.0.4
django-sri==0.2.0 django-sri==0.2.0
django-brotli==0.2.0

View file

@ -46,6 +46,8 @@ INSTALLED_APPS = [
MIDDLEWARE = [ MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware", "django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware", "whitenoise.middleware.WhiteNoiseMiddleware",
"django_brotli.middleware.BrotliMiddleware",
"django.middleware.gzip.GZipMiddleware",
"django.middleware.common.CommonMiddleware", "django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware", "django.middleware.csrf.CsrfViewMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware",