Tweak max-age for semver/tag redirects

This commit is contained in:
Michael Jackson 2019-01-17 19:13:56 -08:00
parent 276013696e
commit 3526660620
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ function tagRedirect(req, res) {
res
.set({
'Cache-Control': 'public, max-age=14400', // 4 hours
'Cache-Control': 'public, s-maxage=14400, max-age=3600', // 4 hours on CDN, 1 hour on clients
'Cache-Tag': 'redirect, tag-redirect'
})
.redirect(
@ -28,7 +28,7 @@ function semverRedirect(req, res) {
if (maxVersion) {
res
.set({
'Cache-Control': 'public, max-age=14400', // 4 hours
'Cache-Control': 'public, s-maxage=14400, max-age=3600', // 4 hours on CDN, 1 hour on clients
'Cache-Tag': 'redirect, semver-redirect'
})
.redirect(