-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Keep clientAddress on cloned requests #12613
Conversation
User observed that calling actions resulted in an error about not having clientRequest available. This is because the user had a middleware that cloned the request, which loses all of the symbols. The fix is to pass the clientAddress directly into the RenderContext. This deprecates the `clientAddressSymbol`, but we need to keep it for now because some adapters set the clientAddress that way. Note that similar fixes should be done for other symbol usage on the Request object (locals is one).
🦋 Changeset detectedLatest commit: b3d32e6 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CodSpeed Performance ReportMerging #12613 will not alter performanceComparing Summary
|
.changeset/wild-geckos-draw.md
Outdated
Keep clientAddress on cloned requests | ||
|
||
User observed that calling actions resulted in an error about not having | ||
clientRequest available. | ||
|
||
This is because the user had a middleware that cloned the request, which | ||
loses all of the symbols. | ||
|
||
The fix is to pass the clientAddress directly into the RenderContext. | ||
This deprecates the `clientAddressSymbol`, but we need to keep it for | ||
now because some adapters set the clientAddress that way. | ||
|
||
Note that similar fixes should be done for other symbol usage on the | ||
Request object (locals is one). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we reword the changeset for the users? This one contains a lot of information that users might not understand or don't need.
We might want to highlight the actual deprecation though, and maybe log a warning if the user attempts to use the old value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will reword the changeset. I don't think we should start spitting out warnings this early in a major though. We definitely at least want to update all of the adapters first to not set this symbol.
User observed that calling actions resulted in an error about not having clientRequest available.
This is because the user had a middleware that cloned the request, which loses all of the symbols.
Changes
clientAddressSymbol
, but we need to keep it for now because some adapters set the clientAddress that way.Testing
Docs
N/A, bug fix.