فهرست منبع

[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 سال پیش
والد
کامیت
f79e4d4
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  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):