Magic number

This commit is contained in:
Daniel García Aubert
2018-03-21 16:48:21 +01:00
parent 4a2580c9ea
commit 672b19b106
@@ -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();