Skip to content
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

Sample of custom X-Forwarded-For header name may be misleading #7515

Closed
dasMulli opened this issue Jul 8, 2018 · 1 comment
Closed

Sample of custom X-Forwarded-For header name may be misleading #7515

dasMulli opened this issue Jul 8, 2018 · 1 comment
Assignees
Labels
Pri2 Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

@dasMulli
Copy link

dasMulli commented Jul 8, 2018

Judging from this question on StackOverflow:
https://stackoverflow.com/questions/51228707/configure-asp-net-core-to-work-with-proxy-servers-and-load-balancers

It seems that the sample section for the custom forwarded header name may be confusing and doesn't specifically explain near the sample code that X-Forwarded-For-Custom-Header-Name is meant to be replaced with a string used by a proxy / forwarder.

At the time of writing, it is not yet clear what the OP's problem really is but they seem to have been confused by the sample code.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@guardrex
Copy link
Collaborator

guardrex commented Jul 8, 2018

Thanks @dasMulli!

The current line (slightly cryptically) reads ...

The middleware is configured to forward the X-Forwarded-For and X-Forwarded-Proto headers and is restricted to a single localhost proxy. If additional configuration is required, see the Forwarded Headers Middleware options.

... where Forwarded Headers Middleware options links down to the section showing how to set custom header names. The option is defined by the API comments as ...

Use the header specified by this property instead of the one specified by ForwardedHeadersDefaults.XForwardedForHeaderName. The default is X-Forwarded-For.

Both of those passages aren't explicit enough, and let's give ForwardedProtoHeaderName a similar enhancement. I think an additional Scenarios and use cases example would be a good add as well.

@guardrex guardrex self-assigned this Jul 8, 2018
@guardrex guardrex added Pri2 Source - Docs.ms Docs Customer feedback via GitHub Issue labels Jul 8, 2018
@guardrex guardrex added this to the Sprint 138 (July 2 - July 20) milestone Jul 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pri2 Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
None yet
Development

No branches or pull requests

2 participants