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 <fredrik.no@gmail.com>

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
This commit is contained in:
Ivar Conradi Østhus
2021-04-30 20:16:20 +02:00
committed by GitHub
parent e22c7c8b37
commit dfda721ddb
+2 -1
View File
@@ -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);