Bug report
Describe the bug
Hi, just tried to upgrade from 9.4.4 to 9.5.0. I was previously using the experimental optionalCatchAll flag. On 9.5.0 my optional catch-all routes are working in dev mode (next dev) but no more working when deployed on Vercel.
The issue is that req.query.params value is different between Vercel and dev mode when using optional catch-all routes.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Given a project structure of:
- project
- api/
- api/organizations/
- api/organizations/[organizationId]
- api/organizations/[organizationId]/teams/
- api/organizations/[organizationId]/teams/[[...params]].js
When calling https://example.com/organizations/200/teams on vercel (9.5.0):
req.query.params value: [""]
When calling https://localhost/organizations/200/teams on next dev (9.5.0):
req.query.params value: undefined
When calling https://example.com/organizations/200/teams on vercel (9.4.4):
- req.query.params value:
undefined
When calling https://localhost/organizations/200/teams on next dev (9.4.4):
- req.query.params value:
undefined
Expected behavior
Both vercel and next dev should send the same value for req.query.params, maybe sticking to undefined or anything else that makes sense given current APIs.
System information
- OS: macOS
- Version of Next.js: 9.5.0
- Version of Node.js: 12.8.3
Additional context
n/a
Bug report
Describe the bug
Hi, just tried to upgrade from 9.4.4 to 9.5.0. I was previously using the experimental
optionalCatchAllflag. On 9.5.0 my optional catch-all routes are working in dev mode (next dev) but no more working when deployed on Vercel.The issue is that req.query.params value is different between Vercel and dev mode when using optional catch-all routes.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Given a project structure of:
When calling
https://example.com/organizations/200/teamson vercel (9.5.0):req.query.paramsvalue:[""]When calling
https://localhost/organizations/200/teamsonnext dev(9.5.0):req.query.paramsvalue:undefinedWhen calling
https://example.com/organizations/200/teamson vercel (9.4.4):undefinedWhen calling
https://localhost/organizations/200/teamsonnext dev(9.4.4):undefinedExpected behavior
Both vercel and
next devshould send the same value for req.query.params, maybe sticking toundefinedor anything else that makes sense given current APIs.System information
Additional context
n/a