ForwardedHeadersExtensions.UseForwardedHeaders 方法

定义

重载

UseForwardedHeaders(IApplicationBuilder)

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

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

UseForwardedHeaders(IApplicationBuilder, ForwardedHeadersOptions)

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

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

UseForwardedHeaders(IApplicationBuilder)

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

根据约定,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

参数

返回

IApplicationBuilder

操作完成后 builder 对 的引用。

适用于

UseForwardedHeaders(IApplicationBuilder, ForwardedHeadersOptions)

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

根据约定,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

启用不同的转发选项。

返回

IApplicationBuilder

操作完成后 builder 对 的引用。

适用于