Fix dynamic APIs with query params (#8386)
* Fix dynamic APIs with query params If you define a dynamic API such as ``` pages/ api/ [id].js ``` This api becomes available at `/api/[id]`. If you send a request with a query parameter the value of `req.query.id` will include the query string as well as the path parameter. E.g. the request to `/api/2?test=123` will result in `req.query` being ```javascript { id: "2?test=123", test: "123", } ``` instead of ```javascript { id: "2", test: "123", } ``` * Fix url parse in serverless loader * Add serverless test
Showing
想要评论请 注册 或 登录