-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(core): Add support for x-forwarded-host
and x-forwarded-proto
headers
#16687
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
Conversation
size-limit report 📦
|
'x-forwarded-proto': 'https', | ||
}, | ||
protocol: 'http', |
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.
l: Could you also add one test case for the reverse (protocol: https
but forwarded: http
) just to test that this isn't just accidentally passing because we always have https
?
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.
Nice work!
…` headers (#16687) Adds support for [x-forwarded-host](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-Host) (host forwarding) and [x-forwarded-proto](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-Proto) (protocol forwarding). This is useful when using proxies. Closes #16671 Support for this was also added [in this PR for Next.js](#16500)
Adds support for x-forwarded-host (host forwarding) and x-forwarded-proto (protocol forwarding).
This is useful when using proxies.
Closes #16671
Support for this was also added in this PR for Next.js