From dfda721ddb608ce5dbfc4baf29ff600f94fa76c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Fri, 30 Apr 2021 20:16:20 +0200 Subject: [PATCH] fix: catch all route only for baseUriPath (#825) * fix: catch all route only for baseUriPath * Update src/lib/app.ts Co-authored-by: Fredrik Strand Oseberg Co-authored-by: Fredrik Strand Oseberg --- src/lib/app.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/app.ts b/src/lib/app.ts index 6a31ba5223..d4c7a94c40 100644 --- a/src/lib/app.ts +++ b/src/lib/app.ts @@ -126,9 +126,10 @@ export default function getApp( res.send(indexHTML); }); - app.get('*', (req, res) => { + app.get(`${baseUriPath}/*`, (req, res) => { if (req.path.includes('api')) { res.status(404).send(); + return; } res.send(indexHTML);