mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-19 05:45:27 +00:00
Merge pull request #105 from thgh/patch-2
Fix route not found when url is /?
This commit is contained in:
@@ -125,7 +125,7 @@ function connect_prod() {
|
|||||||
export default dev ? connect_dev : connect_prod;
|
export default dev ? connect_dev : connect_prod;
|
||||||
|
|
||||||
function set_req_pathname(req, res, next) {
|
function set_req_pathname(req, res, next) {
|
||||||
req.pathname = req.url.replace(/\?.+/, '');
|
req.pathname = req.url.replace(/\?.*/, '');
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user