diff --git a/src/middleware/index.ts b/src/middleware/index.ts index bbb88c71c..2572e2b66 100644 --- a/src/middleware/index.ts +++ b/src/middleware/index.ts @@ -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; } -} \ No newline at end of file +}