HstsDomainPolicy Class
Represents an HSTS (HTTP Strict Transport Security) policy for a specific domain.
public sealed class HstsDomainPolicyProperties
| Name | Description |
|---|---|
| ExpiresAt | Gets the date and time when this HSTS policy expires. |
| Host | Gets the domain host name for this HSTS policy. |
| IncludeSubdomains | Gets a value indicating whether the HSTS policy applies to subdomains of the host. |
| IsPreloaded | Gets a value indicating whether the policy comes from the built-in HSTS preload list. |
ExpiresAt
HstsDomainPolicy.csGets the date and time when this HSTS policy expires.
public DateTimeOffset ExpiresAt { get; }Property value
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.
IncludeSubdomains
HstsDomainPolicy.csIsPreloaded
HstsDomainPolicy.csGets a value indicating whether the policy comes from the built-in HSTS preload list.
public bool IsPreloaded { get; }Property value
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
| Name | Description |
|---|---|
| ToString() |