You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect that the searchParam added by the middleware (in case of the default runtime) would also be received by the route handler, just like with the edge runtime.
This only occurs in combination with a rewrite in the middleware. I you were to disable the middleware and do direct requests to the route handler, searchParams are received in both runtime situations as demonstrated within the first 2 steps.
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Enterprise
Available memory (MB): 32488
Available CPU cores: 16
Binaries:
Node: 20.9.0
npm: 10.1.0
Yarn: N/A
pnpm: 8.15.7
Relevant Packages:
next: 14.2.2 // Latest available version is detected (14.2.2).
eslint-config-next: 14.2.2
react: 18.2.0
react-dom: 18.2.0
typescript: 5.4.5
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Middleware & route handlers
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
This was tested locally
The text was updated successfully, but these errors were encountered:
Link to the code that reproduces this issue
https://github.com/LuukSantegoeds/nextjs-searchparams-issue
To Reproduce
Within the linked repository:
Current vs. Expected behavior
I would expect that the searchParam added by the middleware (in case of the default runtime) would also be received by the route handler, just like with the edge runtime.
This only occurs in combination with a rewrite in the middleware. I you were to disable the middleware and do direct requests to the route handler, searchParams are received in both runtime situations as demonstrated within the first 2 steps.
Provide environment information
Which area(s) are affected? (Select all that apply)
Middleware & route handlers
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
This was tested locally
The text was updated successfully, but these errors were encountered: