ForwardedHeadersExtensions.UseForwardedHeaders Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
UseForwardedHeaders(IApplicationBuilder) |
Applies forwarded headers to their matching fields on the current request. By convention, HTTP proxies forward information from the client in well-known HTTP headers. The ForwardedHeadersMiddleware reads these headers and fills in the associated fields on HttpContext. |
UseForwardedHeaders(IApplicationBuilder, ForwardedHeadersOptions) |
Applies forwarded headers to their matching fields on the current request. By convention, HTTP proxies forward information from the client in well-known HTTP headers. The ForwardedHeadersMiddleware reads these headers and fills in the associated fields on HttpContext. |
Applies forwarded headers to their matching fields on the current request.
By convention, HTTP proxies forward information from the client in well-known HTTP headers. The ForwardedHeadersMiddleware reads these headers and fills in the associated fields on HttpContext.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseForwardedHeaders(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ builder);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseForwardedHeaders (this Microsoft.AspNetCore.Builder.IApplicationBuilder builder);
static member UseForwardedHeaders : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseForwardedHeaders (builder As IApplicationBuilder) As IApplicationBuilder
Parameters
- builder
- IApplicationBuilder
The IApplicationBuilder.
Returns
A reference to builder
after the operation has completed.
Applies to
ASP.NET Core 9.0 and other versions
Product | Versions |
---|---|
ASP.NET Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |
Applies forwarded headers to their matching fields on the current request.
By convention, HTTP proxies forward information from the client in well-known HTTP headers. The ForwardedHeadersMiddleware reads these headers and fills in the associated fields on HttpContext.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseForwardedHeaders(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ builder, Microsoft::AspNetCore::Builder::ForwardedHeadersOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseForwardedHeaders (this Microsoft.AspNetCore.Builder.IApplicationBuilder builder, Microsoft.AspNetCore.Builder.ForwardedHeadersOptions options);
static member UseForwardedHeaders : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.ForwardedHeadersOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseForwardedHeaders (builder As IApplicationBuilder, options As ForwardedHeadersOptions) As IApplicationBuilder
Parameters
- builder
- IApplicationBuilder
The IApplicationBuilder.
- options
- ForwardedHeadersOptions
Enables the different forwarding options.
Returns
A reference to builder
after the operation has completed.
Applies to
ASP.NET Core 9.0 and other versions
Product | Versions |
---|---|
ASP.NET Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |