basepath match needs to be anchored to start of path

Signed-off-by: James Ketrenos <james_gitlab@ketrenos.com>
This commit is contained in:
James Ketrenos 2019-11-28 02:23:18 -08:00
parent b91ba94439
commit 477cad851a

View File

@ -12,7 +12,7 @@ router.get("/*", function(req, res, next) {
const parts = url.parse(req.url),
basePath = req.app.get("basePath");
if (!/\/[^/]+\.html$/.exec(parts.pathname)) {
if (!/^\/[^/]+\.html$/.exec(parts.pathname)) {
return next();
}