ForwardedHeadersExtensions.UseForwardedHeaders 方法

定义

重载

UseForwardedHeaders(IApplicationBuilder)

将转发的标头应用于当前请求上的匹配字段。

按照约定,HTTP 代理在已知的 HTTP 标头中转发来自客户端的信息。 读取 ForwardedHeadersMiddleware 这些标头并填充 HttpContext 上的关联字段。

UseForwardedHeaders(IApplicationBuilder, ForwardedHeadersOptions)

将转发的标头应用于当前请求上的匹配字段。

按照约定,HTTP 代理在已知的 HTTP 标头中转发来自客户端的信息。 读取 ForwardedHeadersMiddleware 这些标头并填充 HttpContext 上的关联字段。

UseForwardedHeaders(IApplicationBuilder)

Source:
ForwardedHeadersExtensions.cs
Source:
ForwardedHeadersExtensions.cs
Source:
ForwardedHeadersExtensions.cs

将转发的标头应用于当前请求上的匹配字段。

按照约定,HTTP 代理在已知的 HTTP 标头中转发来自客户端的信息。 读取 ForwardedHeadersMiddleware 这些标头并填充 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

参数

返回

操作完成后对 builder 的引用。

适用于

UseForwardedHeaders(IApplicationBuilder, ForwardedHeadersOptions)

Source:
ForwardedHeadersExtensions.cs
Source:
ForwardedHeadersExtensions.cs
Source:
ForwardedHeadersExtensions.cs

将转发的标头应用于当前请求上的匹配字段。

按照约定,HTTP 代理在已知的 HTTP 标头中转发来自客户端的信息。 读取 ForwardedHeadersMiddleware 这些标头并填充 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

参数

options
ForwardedHeadersOptions

启用不同的转发选项。

返回

操作完成后对 builder 的引用。

适用于