We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5abbe63 commit 98f07bcCopy full SHA for 98f07bc
src/Share.hs
@@ -143,7 +143,12 @@ mkShareServer env = do
143
appServer reqTagsKey req noCacheHeader (Cookies.cookieVal -> noCacheCookie) mayRequestID mayUserId =
144
let reqMethod = Wai.requestMethod req
145
addReqCtx m = do
146
- let useCaching = not Deployment.onLocal && Maybe.isNothing noCacheHeader && Maybe.isNothing noCacheCookie
+ let isSet = \case
147
+ Nothing -> False
148
+ Just v
149
+ | lower <- Text.toLower v, lower == "false" -> False
150
+ | otherwise -> True
151
+ let useCaching = not Deployment.onLocal && not (isSet noCacheHeader) && not (isSet noCacheCookie)
152
let reqTags =
153
Map.fromList
154
[ ("caching-disabled", showBool $ not useCaching),
0 commit comments