2019-03-24 08:28:57 +01:00

11 lines
319 B
JavaScript

module.exports = function nocache () {
return function nocache (req, res, next) {
res.setHeader('Surrogate-Control', 'no-store')
res.setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, proxy-revalidate')
res.setHeader('Pragma', 'no-cache')
res.setHeader('Expires', '0')
next()
}
}