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 +}