From c8ad7ccd728a4dad9e7ae43a8b9170a8061b4448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Tue, 9 Jul 2024 18:39:43 +0200 Subject: [PATCH] fix(core): Ensure correct `Cache-Control` header on `/` as well (no-changelog) (#9983) --- packages/cli/src/Server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index a7c854d7fb..0fd9d399ac 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -335,6 +335,7 @@ export class Server extends AbstractServer { // Route all UI urls to index.html to support history-api const nonUIRoutes: Readonly = [ 'assets', + 'static', 'types', 'healthz', 'metrics', @@ -372,12 +373,12 @@ export class Server extends AbstractServer { this.app.use( '/', + historyApiHandler, express.static(staticCacheDir, { ...cacheOptions, setHeaders: setCustomCacheHeader, }), express.static(EDITOR_UI_DIST_DIR, cacheOptions), - historyApiHandler, ); } else { this.app.use('/', express.static(staticCacheDir, cacheOptions));