Fix frontend not loading after update. #4266

This commit is contained in:
Koen Kanters 2020-10-11 16:17:52 +02:00
parent 9098bb1e06
commit 73bc34f419

View File

@ -33,7 +33,13 @@ class Frontend extends Extension {
if (this.development) {
this.proxy = httpProxy.createProxyServer({ws: true});
} else {
this.fileServer = serveStatic(frontend.getPath());
/* istanbul ignore next */
const options = {setHeaders: (res, path) => {
if (path.endsWith('index.html')) {
res.setHeader('Cache-Control', 'no-store');
}
}};
this.fileServer = serveStatic(frontend.getPath(), options);
}
this.wss = new WebSocket.Server({noServer: true});