-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
fix: set x-forwarded-host
based on request
#58500
fix: set x-forwarded-host
based on request
#58500
Conversation
Co-authored-by: BRKalow <bryce@clerk.dev>
Closed #58399 in favour of this PR as it has test cases |
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 |
Maybe @balazsorban44 can review this PR, as the author of #57815 |
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 |
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.
Thanks for the PR!!
Tests Passed |
nice |
Been looking forward to this! Thanks! |
Co-authored-by: @BRKalow bryce@clerk.dev
What?
A number of our customers have been experiencing issues stemming from an
x-forwarded-host
header that doesn't match thehost
header.Why?
This PR removes functionality which sets
x-forwarded-host
toreq.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-host
header will remain aslocalhost:${port}
while the actual requested host will contain the subdomain.Related
x-forwarded-*
in Middleware #57815 (comment)