Added cache control header to response.

This commit is contained in:
Nicholas Staples
2016-02-02 14:02:10 +00:00
parent 0f325938e1
commit 7d4c2045bc

View File

@@ -157,6 +157,10 @@ def useful_headers_after_request(response):
response.headers.add('X-XSS-Protection', '1; mode=block')
response.headers.add('Content-Security-Policy',
"default-src 'self' 'unsafe-inline'; font-src 'self' data:;") # noqa
if 'Cache-Control' in response.headers:
del response.headers['Cache-Control']
response.headers.add(
'Cache-Control', 'no-store, max-age=43200, no-cache, private, must-revalidate')
return response