Skip to content
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

Extending req/res objects in custom server/standalone mode for App router #55548

Closed
1 task done
coltonehrman opened this issue Sep 18, 2023 · 3 comments
Closed
1 task done
Labels
bug Issue was opened via the bug report template. locked Output (export/standalone) Related to the the output option in `next.config.js`.

Comments

@coltonehrman
Copy link
Contributor

Link to the code that reproduces this issue

#54440

To Reproduce

See #54440

Current vs. Expected behavior

See #54440

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 22.6.0: Wed Jul  5 22:21:53 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6020
Binaries:
  Node: 16.20.1
  npm: 8.19.4
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 13.4.20-canary.37
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.0.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

App Router, Standalone mode (output: "standalone")

Additional context

Is this behavior suppose to exist for App router?

Based on the docs here, it seems that extending/modifying the Request object and accessing it in the App router is not possible. How will these use cases which were supported in Pages router be supported in App router?

Screenshot 2023-09-18 at 2 57 04 PM
@coltonehrman coltonehrman added the bug Issue was opened via the bug report template. label Sep 18, 2023
@github-actions github-actions bot added the Output (export/standalone) Related to the the output option in `next.config.js`. label Sep 18, 2023
@nicholasgriffintn
Copy link

Yeah this is the last thing holding us off from app router if the speed improvements are actually effective (not tried in a while), can't move off of custom server without having to host a proxy in front of next either, so don't really want to do that...

@kenreis
Copy link

kenreis commented Feb 14, 2024

Is this something that will be addressed. We are currently looking into transitioning to the App router, but we rely on extending the req object through our custom server set up. Not having access to the extended request object is a blocker for us.

Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. locked Output (export/standalone) Related to the the output option in `next.config.js`.
Projects
None yet
Development

No branches or pull requests

3 participants