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 request object stopped working #54288

Closed
1 task done
itrelease opened this issue Aug 19, 2023 · 3 comments
Closed
1 task done

Extending request object stopped working #54288

itrelease opened this issue Aug 19, 2023 · 3 comments
Labels
bug Issue was opened via the bug report template. locked

Comments

@itrelease
Copy link

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.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000
    Binaries:
      Node: 18.15.0
      npm: 9.5.0
      Yarn: 1.22.19
      pnpm: 8.4.0
    Relevant Packages:
      next: 13.4.19
      eslint-config-next: 13.4.19
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: N/A

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

https://codesandbox.io/p/sandbox/sad-jepsen-q3792z

To Reproduce

Update nextjs to version > 13.4.12

Describe the Bug

In my project I'm using custom expressjs server which sets few middleware functions and some of them extending request object with new fields and these fields was accessible in getServerSideProps function via context.request[here_new_my_new_field]. This approach worked up to the version 13.4.12.

Expected Behavior

Custom fields should be accessible in request object and I should see GUID is wow-test-guid

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

@itrelease itrelease added the bug Issue was opened via the bug report template. label Aug 19, 2023
@MarcusNotheis
Copy link

Looks like this issue is also affecting API Routes (#54129)

@balazsorban44
Copy link
Member

Closing in favor of #54440. Feel free to comment there!

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2023

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 added the locked label Sep 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2023
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
Projects
None yet
Development

No branches or pull requests

3 participants