basepath match needs to be anchored to start of path
Signed-off-by: James Ketrenos <james_gitlab@ketrenos.com>
This commit is contained in:
parent
b91ba94439
commit
477cad851a
@ -12,7 +12,7 @@ router.get("/*", function(req, res, next) {
|
|||||||
const parts = url.parse(req.url),
|
const parts = url.parse(req.url),
|
||||||
basePath = req.app.get("basePath");
|
basePath = req.app.get("basePath");
|
||||||
|
|
||||||
if (!/\/[^/]+\.html$/.exec(parts.pathname)) {
|
if (!/^\/[^/]+\.html$/.exec(parts.pathname)) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user