Set Cache-Control header on badges
Since github caches external resource we need to indicate that this badge is supposed to be changing. https://github.com/github/markup/issues/224
This commit is contained in:
parent
0233d07f4c
commit
ad053dc101
1 changed files with 1 additions and 0 deletions
|
@ -27,6 +27,7 @@ getPackageR = packagePage Nothing
|
|||
|
||||
getPackageBadgeR :: PackageName -> SnapshotBranch -> Handler TypedContent
|
||||
getPackageBadgeR pname branch = do
|
||||
cacheSeconds (3 * 60 * 60)
|
||||
snapName <- maybe notFound pure =<< newestSnapshot branch
|
||||
Entity sid _ <- maybe notFound pure =<< lookupSnapshot snapName
|
||||
mVersion <- do mSnapPackage <- lookupSnapshotPackage sid (unPackageName pname)
|
||||
|
|
Loading…
Reference in a new issue