on master help sign in
Merge pull request #787 from obsidiansystems/ls-immutable-directive

Add immutable directive to Cache-Control header

commit354795de470abe2e607e03b964e36944fb521710 authorAli Abrar <aliabrar@gmail.com> dateFri 4 Dec 2020, 09:11 (6 years ago) parent98b397521eaeca
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