Magic number
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
module.exports = function setCacheControlHeader ({ ttl = 31536000, revalidate = false } = {}) {
|
||||
const ONE_YEAR_IN_SECONDS = 60 * 60 * 24 * 365;
|
||||
|
||||
module.exports = function setCacheControlHeader ({ ttl = ONE_YEAR_IN_SECONDS, revalidate = false } = {}) {
|
||||
return function setCacheControlHeaderMiddleware (req, res, next) {
|
||||
if (req.method !== 'GET') {
|
||||
return next();
|
||||
|
||||
Reference in New Issue
Block a user