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此方法扩展的实例。

返回

适用于