Increase redirect timeout to 5 minutes
This commit is contained in:
parent
d6fde9fb33
commit
e83103c6b5
|
@ -9,10 +9,9 @@ const incrementCounter = require('../utils/incrementCounter');
|
|||
function tagRedirect(req, res) {
|
||||
const version = req.packageInfo['dist-tags'][req.packageVersion];
|
||||
|
||||
// Cache tag redirects for 1 minute.
|
||||
res
|
||||
.set({
|
||||
'Cache-Control': 'public, max-age=60',
|
||||
'Cache-Control': 'public, max-age=300', // 5 minutes
|
||||
'Cache-Tag': 'redirect, tag-redirect'
|
||||
})
|
||||
.redirect(
|
||||
|
@ -28,10 +27,9 @@ function semverRedirect(req, res) {
|
|||
);
|
||||
|
||||
if (maxVersion) {
|
||||
// Cache semver redirects for 1 minute.
|
||||
res
|
||||
.set({
|
||||
'Cache-Control': 'public, max-age=60',
|
||||
'Cache-Control': 'public, max-age=300', // 5 minutes
|
||||
'Cache-Tag': 'redirect, semver-redirect'
|
||||
})
|
||||
.redirect(
|
||||
|
|
Loading…
Reference in New Issue