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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -395,9 +395,9 @@ export class Server extends AbstractServer {
!req.path.endsWith('.wasm') && !req.path.endsWith('.wasm') &&
!nonUIRoutesRegex.test(req.path) !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, () => { securityHeadersMiddleware(req, res, () => {
res.sendFile('index.html', { root: staticCacheDir, maxAge, lastModified: true }); res.sendFile('index.html', { root: staticCacheDir, maxAge: 0, lastModified: false });
}); });
} else { } else {
next(); next();