From c666e137832f26944f3ce21eb0715532f0ee7179 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 21 Nov 2024 16:40:46 +0100 Subject: [PATCH] app-backend: use req.path for index check Signed-off-by: Patrik Oldsberg --- plugins/app-backend/src/service/router.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/app-backend/src/service/router.ts b/plugins/app-backend/src/service/router.ts index bfd0ab2516..24671fe5e9 100644 --- a/plugins/app-backend/src/service/router.ts +++ b/plugins/app-backend/src/service/router.ts @@ -306,8 +306,7 @@ async function createEntryPointRouter({ const rootRouter = Router(); rootRouter.use((req, _res, next) => { // Make sure / and /index.html are handled by the HTML5 route below - const urlWithoutQuery = req.url.split('?')[0]; - if (urlWithoutQuery === '/' || urlWithoutQuery === '/index.html') { + if (req.path === '/' || req.path === '/index.html') { next('router'); } else { next();