From c9be11d58a0e9c0beaf5904932b40b6d866f2ecc Mon Sep 17 00:00:00 2001 From: Yuri Tatishchev Date: Mon, 16 Jun 2025 23:01:52 -0700 Subject: [PATCH] WIP: attempt to fix cache issues --- src/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 8dd0581..78fb6c5 100644 --- a/src/index.js +++ b/src/index.js @@ -92,6 +92,13 @@ app.use(session({ logged: false })); +// disable cache globally because it may break things between server restarts, +// since the paths aren't unique +app.use(function (req, res, next) { + res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); + next(); +}); + // home page app.get("/", function (req, res) { @@ -181,4 +188,4 @@ server.listen(settings.server_port, settings.server_ip, function get_time() { let d = new Date(); return d.getTime(); -} \ No newline at end of file +}