Explorar o código

[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 %!s(int64=11) %!d(string=hai) anos
pai
achega
f79e4d4
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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):