共用方式為


HstsBuilderExtensions.UseHsts(IApplicationBuilder) 方法

定義

新增使用 HSTS 的中介軟體,這會新增 Strict-Transport-Security 標頭。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseHsts(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHsts (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseHsts : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseHsts (app As IApplicationBuilder) As IApplicationBuilder

參數

app
IApplicationBuilder

IApplicationBuilder這個方法擴充的實例。

傳回

適用於