You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
ID: e548cd16-b06c-5802-a1a7-c627167857ae
Version Independent ID: c48abb08-bea3-dcff-c067-2edf5dc9b3a6
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.
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.
The text was updated successfully, but these errors were encountered: