Skip to content

Commit

Permalink
fix: Temporarily disable serving compressed index file. (#24657)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bdolgov authored Nov 6, 2024
1 parent f2e5d59 commit 7267d27
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/extension/frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 7267d27

Please sign in to comment.