Use immutable cache for HTML5 assets
This commit is contained in:
@@ -20,7 +20,7 @@ HTML5_CONTENT_SECURITY_POLICY = (
|
||||
class Html5StaticFiles(StaticFiles):
|
||||
def file_response(self, *args, **kwargs):
|
||||
response = super().file_response(*args, **kwargs)
|
||||
response.headers.setdefault("Cache-Control", "public, max-age=86400")
|
||||
response.headers.setdefault("Cache-Control", "public, max-age=31536000, immutable")
|
||||
response.headers.setdefault("X-Content-Type-Options", "nosniff")
|
||||
return response
|
||||
|
||||
|
||||
Reference in New Issue
Block a user