fix stale cache possibly

This commit is contained in:
jwinterm
2026-02-20 10:12:29 -05:00
parent 1a714fd69d
commit 101083b9c1
+9 -1
View File
@@ -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