app-backend: use req.path for index check
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
committed by
Adam Kunicki
parent
af4be53a14
commit
c666e13783
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user