on master help sign in
Add immutable directive to Cache-Control header
commit44215665ad0f2ce45376c4337b45e344a49336a0 authorLeon P Smith <leon.smith@obsidian.systems> dateFri 10 Jul 2020, 12:21 (6 years ago) parent989641f
1 file changed+1−1
lib/snap-extras/src/Obelisk/Snap/Extras.hs+1−1
lib/snap-extras/src/Obelisk/Snap/Extras.hs+1−1
@@ -17,7 +17,7 @@ import System.Directory
1717-- | Set response header for "permanent" caching
1818cachePermanently :: MonadSnap m => m ()
1919cachePermanently = do
20− modifyResponse $ setHeader "Cache-Control" "public, max-age=315360000"
20+ modifyResponse $ setHeader "Cache-Control" "public, max-age=315360000, immutable"
2121 modifyResponse $ setHeader "Expires" "Tue, 01 Feb 2050 00:00:00 GMT" --TODO: This should be set to "approximately one year from the time the response is sent"
2222
2323-- | Set response header to not cache