From 101083b9c1bddd343e6b26eb13abd61d3fc6465b Mon Sep 17 00:00:00 2001 From: jwinterm Date: Fri, 20 Feb 2026 10:12:29 -0500 Subject: [PATCH] fix stale cache possibly --- src/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 3715d18..eab09b6 100644 --- a/src/index.js +++ b/src/index.js @@ -56,7 +56,15 @@ let paymentExpiryInterval = null; // Initialized later when payment system start const socketHandlers = new SocketHandlers(io, activeGames, broadcastManager, debugManager, gameModeManager, walletRPCService); // Configure static file serving const htmlPath = path.join(__dirname, '../html'); -app.use(express.static(htmlPath)); +app.use(express.static(htmlPath, { + etag: true, + lastModified: true, + setHeaders: (res, filePath) => { + if (filePath.endsWith('.html') || filePath.endsWith('.js')) { + res.setHeader('Cache-Control', 'no-cache'); + } + } +})); app.use(express.json()); // Parse JSON for API endpoints // Serve main page