mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 18:39:09 -07:00
Fix frontend not loading after update. #4266
This commit is contained in:
parent
9098bb1e06
commit
73bc34f419
@ -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});
|
||||
|
Loading…
Reference in New Issue
Block a user