UNPKG
node-nocache
Version:
latest (1.0.5)
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Add nocache headers to response
github.com/mingchen/node-nocache
mingchen/node-nocache
node-nocache
/
nocache.js
14 lines
(10 loc)
•
269 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(
function
()
{
'use strict'
; }());
function
nocache
(req, res, next)
{ res.setHeader(
'Cache-Control'
,
'no-cache, no-store, must-revalidate'
); res.setHeader(
'Expires'
,
'-1'
); res.setHeader(
'Pragma'
,
'no-cache'
);
next
(); }
module
.exports = nocache;