1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);