From 161ec95b05505981da1ed569e6737798f7e8b6ff Mon Sep 17 00:00:00 2001 From: 30hours Date: Fri, 27 Oct 2023 16:23:42 +1030 Subject: [PATCH] Fix caching issue on API --- api/server.js | 3 +++ html/index.html | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/api/server.js b/api/server.js index b469897..bcea8e0 100644 --- a/api/server.js +++ b/api/server.js @@ -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) => { diff --git a/html/index.html b/html/index.html index cfd8519..7e9b58b 100644 --- a/html/index.html +++ b/html/index.html @@ -7,6 +7,10 @@ + + + + blah2