AntiforgeryOptions.RequireSsl Property

Definition

Caution

This property is obsolete and will be removed in a future version. The recommended alternative is to set Cookie.SecurePolicy.

This property is obsolete and will be removed in a future version. The recommended alternative is to set on Cookie.

true is equivalent to Always. false is equivalent to None.

Specifies whether SSL is required for the antiforgery system to operate. If this setting is 'true' and a non-SSL request comes into the system, all antiforgery APIs will fail.

C#
public bool RequireSsl { get; set; }
C#
[System.Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is to set Cookie.SecurePolicy.")]
public bool RequireSsl { get; set; }

Property Value

Attributes

Applies to

Product Versions (Obsolete)
ASP.NET Core 1.0, 1.1 (2.0, 2.1, 2.2)