fix: set x-forwarded-host based on request#58500
Merged
timneutkens merged 4 commits intovercel:canaryfrom Nov 16, 2023
Merged
Conversation
Co-authored-by: BRKalow <bryce@clerk.dev>
eyn
reviewed
Nov 15, 2023
|
Closed #58399 in favour of this PR as it has test cases |
1 task
Contributor
|
Note that this change addresses currently broken behavior that renders Server Actions unusable in dev mode for subdomains of localhost Right now (14.0.2–14.0.3), calling any server action from |
Contributor
|
Maybe @balazsorban44 can review this PR, as the author of #57815 |
Member
Stats from current PRDefault BuildGeneral
Client Bundles (main, webpack)
Legacy Client Bundles (polyfills)
Client Pages
Client Build Manifests
Rendered Page Sizes
Edge SSR bundle Size
Middleware size
Next Runtimes
Diff detailsDiff for page.jsDiff too large to display Diff for edge-ssr.jsDiff too large to display Diff for server.runtime.prod.jsDiff too large to display |
Member
Tests Passed |
This was referenced Nov 16, 2023
|
nice |
|
Been looking forward to this! Thanks! |
Closed
24 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Co-authored-by: @brkalow bryce@clerk.dev
What?
A number of our customers have been experiencing issues stemming from an
x-forwarded-hostheader that doesn't match thehostheader.Why?
This PR removes functionality which sets
x-forwarded-hosttoreq.headers['host']and relies solely on the server's hostname and port.This can be seen locally when visiting the app via a localhost subdomain.
The
x-forwarded-hostheader will remain aslocalhost:${port}while the actual requested host will contain the subdomain.Related
x-forwarded-*in Middleware #57815 (comment)