Fix route not found when url is /?

This commit is contained in:
Thomas Ghysels
2018-01-26 02:48:56 +01:00
committed by GitHub
parent 8bad37205d
commit 422e31e183

View File

@@ -125,7 +125,7 @@ function connect_prod() {
export default dev ? connect_dev : connect_prod;
function set_req_pathname(req, res, next) {
req.pathname = req.url.replace(/\?.+/, '');
req.pathname = req.url.replace(/\?.*/, '');
next();
}
@@ -279,4 +279,4 @@ function try_serialize(data) {
} catch (err) {
return null;
}
}
}