HstsDomainPolicy Class

Represents an HSTS (HTTP Strict Transport Security) policy for a specific domain.

public sealed class HstsDomainPolicy

Properties

NameDescription
ExpiresAtGets the date and time when this HSTS policy expires.
HostGets the domain host name for this HSTS policy.
IncludeSubdomainsGets a value indicating whether the HSTS policy applies to subdomains of the host.
IsPreloadedGets a value indicating whether the policy comes from the built-in HSTS preload list.

Gets the date and time when this HSTS policy expires.

public DateTimeOffset ExpiresAt { get; }

Property value

DateTimeOffset

Remarks

DateTimeOffset.MaxValue when HstsDomainPolicy.IsPreloaded is true: the built-in list is compiled into the assembly and stays valid until the package is updated.

Gets the domain host name for this HSTS policy.

public string Host { get; }

Property value

string

IncludeSubdomains

HstsDomainPolicy.cs

Gets a value indicating whether the HSTS policy applies to subdomains of the host.

public bool IncludeSubdomains { get; }

Property value

bool

Gets a value indicating whether the policy comes from the built-in HSTS preload list.

public bool IsPreloaded { get; }

Property value

bool

Remarks

A preloaded policy never expires, and no Strict-Transport-Security response header can narrow it, expire it or remove it: a policy learned from a header may only widen the coverage of a preloaded host. Only HstsDomainPolicyCollection.Remove takes a host off the built-in list, and only for the collection it is called on.

Methods

NameDescription
ToString()
public override string ToString()

Returns

string

No documentation is available.