-
Notifications
You must be signed in to change notification settings - Fork 580
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
CORS does not deal with Forwarded
or X-Forwarded-xxx
headers
#4725
Comments
Forward
or X-Forward-xxx
headersForwarded
or X-Forwarded-xxx
headers
My recommended design (for discussion):
We may add additional methods, or we may add a single method that just returns |
|
The following information is needed:
The reason I do not like to combine In addition we should follow the proxy whitelist approach for I agree we may want to use existing methods to obtain the computed information, and add methods for "raw". This requires a bit of an analysis of usages of methods that provide such information (for example |
I was not suggesting combining I agree that, if both types of headers are present--that is, both You mentioned using a whitelist for |
yes, we should do the same to trust the intermediaries regardless of header types |
Environment Details
Problem Description
Helidon's CORS support relies on the
Host
header (among other things) to make its decisions.If intermediaries--load balancers, etc.--lie between the real client and the service, then when the request reaches the Helidon service the
Host
value no longer reflects the actual host.HTTP specifies the
Forwarded
header which conveysby
,for
,host
(which might include the port), andprotocol
as specified by the originating client.Non-standard but widespread headers
X-Forwarded-Host
,X-Forwarded-For
,X-Forwarded-Proto
, andX-Forwarded-Port
express the same information.Helidon's CORS processing can be enhanced to prefer
Forwarded
if present, thenX-Forwarded-xxx
if present, and thenHost
for deriving the "effective host" to use in CORS decision-making.Depends on #5824
The text was updated successfully, but these errors were encountered: