소스 검색

[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):