Pārlūkot izejas kodu

[core] Add ConditionalGetMiddleware

This middleware adds Content-Length to the response, and
adds ETag awareness, which we can eventually use to allow
the browser to cache pages.
Erick Tryzelaar 11 gadi atpakaļ
vecāks
revīzija
f79e4d4a4c
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      desktop/core/src/desktop/settings.py

+ 2 - 1
desktop/core/src/desktop/settings.py

@@ -128,7 +128,8 @@ MIDDLEWARE_CLASSES = [
     'desktop.middleware.ClusterMiddleware',
     'django.middleware.transaction.TransactionMiddleware',
     # 'debug_toolbar.middleware.DebugToolbarMiddleware'
-    'django.middleware.csrf.CsrfViewMiddleware'
+    'django.middleware.csrf.CsrfViewMiddleware',
+    'django.middleware.http.ConditionalGetMiddleware',
 ]
 
 if os.environ.get(ENV_DESKTOP_DEBUG):