-
Notifications
You must be signed in to change notification settings - Fork 27.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra fields attached to request no longer readable in API handler #54129
Comments
We cannot recreate the issue with the provided information. Please add a reproduction in order for us to be able to investigate. Why was this issue marked with the
|
Closing in favor of #54440. Feel free to comment there! |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 Binaries: Node: 16.17.1 npm: 8.15.0 Yarn: 1.22.19 pnpm: 7.32.4 Relevant Packages: next: 13.4.16 eslint-config-next: N/A react: 18.1.0 react-dom: 18.1.0 typescript: 4.8.4 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Middleware / Edge (API routes, runtime)
Link to the code that reproduces this issue or a replay of the bug
n/a
To Reproduce
app.getRequestHandler()(req,res,url)
, attach some data to req (for example, some authentication result). i.e.req.myTestField = 1
req.myTestField
, and observe its not presentDescribe the Bug
Data set on the request object with a custom server is no longer preserved when API routes receive the request.
Expected Behavior
As was the case in previous versions of next.js (last confirmed 13.4.8), any extra fields set on request should be carried over into API routes.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: