HstsServicesExtensions.AddHsts(IServiceCollection, Action<HstsOptions>) HstsServicesExtensions.AddHsts(IServiceCollection, Action<HstsOptions>) HstsServicesExtensions.AddHsts(IServiceCollection, Action<HstsOptions>) Method

Definition

Adds HSTS services.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHsts (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.HttpsPolicy.HstsOptions> configureOptions);
static member AddHsts : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.HttpsPolicy.HstsOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHsts (services As IServiceCollection, configureOptions As Action(Of HstsOptions)) As IServiceCollection

Parameters

configureOptions
Action<HstsOptions>

A delegate to configure the HstsOptions.

Returns

Applies to