remove addExpiresHeaders

v1.18.x
Baris Usakli 8 years ago
parent e036e26238
commit 59aeee6516

@ -23,17 +23,5 @@ module.exports = function (middleware) {
next(); next();
}; };
middleware.addExpiresHeaders = function (req, res, next) {
if (req.app.enabled('cache')) {
res.setHeader('Cache-Control', 'public, max-age=5184000');
res.setHeader('Expires', new Date(Date.now() + 5184000000).toUTCString());
} else {
res.setHeader('Cache-Control', 'public, max-age=0');
res.setHeader('Expires', new Date().toUTCString());
}
next();
};
}; };

Loading…
Cancel
Save