fix(core): Remove index.html caching entirely (#13563)

This commit is contained in:
Alex Grozav
2025-02-27 14:07:41 +02:00
committed by GitHub
parent ec57ac4ea2
commit afba8f9ff8

View File

@@ -395,9 +395,9 @@ export class Server extends AbstractServer {
!req.path.endsWith('.wasm') &&
!nonUIRoutesRegex.test(req.path)
) {
res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate');
res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate, proxy-revalidate');
securityHeadersMiddleware(req, res, () => {
res.sendFile('index.html', { root: staticCacheDir, maxAge, lastModified: true });
res.sendFile('index.html', { root: staticCacheDir, maxAge: 0, lastModified: false });
});
} else {
next();