From 4deaf411c44936f867dc33f9a61e156766db2884 Mon Sep 17 00:00:00 2001 From: Boris Dolgov Date: Wed, 6 Nov 2024 00:47:07 +0100 Subject: [PATCH] fix: Temporarily disable serving compressed index file. express-static-gzip does not handle redirects with custom base URLs properly. As index.html file is only 5KB, compression is not critical for it. --- lib/extension/frontend.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/extension/frontend.ts b/lib/extension/frontend.ts index b1a040f832..20ad3f107b 100644 --- a/lib/extension/frontend.ts +++ b/lib/extension/frontend.ts @@ -74,7 +74,10 @@ export default class Frontend extends Extension { /* istanbul ignore next */ const options = { enableBrotli: true, + // TODO: https://github.com/Koenkk/zigbee2mqtt/issues/24654 - enable compressed index serving when express-static-gzip is fixed. + index: false, serveStatic: { + index: 'index.html', setHeaders: (res: ServerResponse, path: string): void => { if (path.endsWith('index.html')) { res.setHeader('Cache-Control', 'no-store');