Middleware to add never_cache headers to everything (#51)

This commit is contained in:
Scott Bragg 2016-07-15 12:18:36 +10:00 committed by GitHub
parent ce10e021f6
commit 6598d9f737
2 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,7 @@
from django.utils.cache import add_never_cache_headers
class DisableClientSideCachingMiddleware(object):
def process_response(self, request, response):
add_never_cache_headers(response)
return response

View file

@ -115,6 +115,7 @@ MIDDLEWARE_CLASSES = [
'wagtail.wagtailcore.middleware.SiteMiddleware',
'wagtail.wagtailredirects.middleware.RedirectMiddleware',
'pinaxcon.monkey_patch.MonkeyPatchMiddleware',
'pinaxcon.disable_cscache.DisableClientSideCachingMiddleware',
]
ROOT_URLCONF = "pinaxcon.urls"