mirror of
https://github.com/30hours/blah2.git
synced 2024-11-18 12:33:58 +00:00
Fix caching issue on API
This commit is contained in:
parent
0e1cef7874
commit
161ec95b05
2 changed files with 7 additions and 0 deletions
|
@ -13,6 +13,9 @@ const app = express();
|
|||
// header on all requests
|
||||
app.use(function(req, res, next) {
|
||||
res.header("Access-Control-Allow-Origin", "*");
|
||||
res.header('Cache-Control', 'private, no-cache, no-store, must-revalidate');
|
||||
res.header('Expires', '-1');
|
||||
res.header('Pragma', 'no-cache');
|
||||
next();
|
||||
});
|
||||
app.get('/', (req, res) => {
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<meta http-equiv="Expires" content="0">
|
||||
|
||||
<title>blah2</title>
|
||||
|
||||
<!-- load lib js -->
|
||||
|
|
Loading…
Reference in a new issue