共用方式為


ForwardedHeadersExtensions.UseForwardedHeaders 方法

定義

多載

UseForwardedHeaders(IApplicationBuilder)

將轉送的標頭套用至目前要求的相符欄位。

根據慣例,HTTP Proxy 會從已知 HTTP 標頭中的用戶端轉送資訊。 會 ForwardedHeadersMiddleware 讀取這些標頭,並填入 HttpCoNtext 的相關欄位。

UseForwardedHeaders(IApplicationBuilder, ForwardedHeadersOptions)

將轉送的標頭套用至目前要求的相符欄位。

根據慣例,HTTP Proxy 會從已知 HTTP 標頭中的用戶端轉送資訊。 會 ForwardedHeadersMiddleware 讀取這些標頭,並填入 HttpCoNtext 的相關欄位。

UseForwardedHeaders(IApplicationBuilder)

來源:
ForwardedHeadersExtensions.cs
來源:
ForwardedHeadersExtensions.cs
來源:
ForwardedHeadersExtensions.cs

將轉送的標頭套用至目前要求的相符欄位。

根據慣例,HTTP Proxy 會從已知 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)

來源:
ForwardedHeadersExtensions.cs
來源:
ForwardedHeadersExtensions.cs
來源:
ForwardedHeadersExtensions.cs

將轉送的標頭套用至目前要求的相符欄位。

根據慣例,HTTP Proxy 會從已知 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 參考。

適用於