SaaS CMS has officially launched! Learn more now.

Class AspNetAntiForgeryOptions

Contains options for anti forgery.

Inheritance
System.Object
AspNetAntiForgeryOptions
Namespace: EPiServer.Framework.Web
Assembly: EPiServer.Framework.AspNetCore.dll
Version: 12.0.3
Syntax
[Options(ConfigurationSection = "Cms")]
public class AspNetAntiForgeryOptions : Object

Constructors

AspNetAntiForgeryOptions()

Declaration
public AspNetAntiForgeryOptions()

Properties

CookieRequireSSL

Indicate the value of the Secure property of the cookie should be assigned.

Declaration
public Nullable<bool> CookieRequireSSL { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>
Remarks

null indicates the "requireSSL" attribute in web.config is being used.

CookieSameSiteType

Indicate if the value of the SameSite property of the cookie should be assigned.

Declaration
public Nullable<SameSiteType> CookieSameSiteType { get; set; }
Property Value
Type Description
System.Nullable<SameSiteType>
Remarks

null indicates the "sameSite" attribute in web.config is being used.

EnableSameOriginCheck

Determines whether AspNetAntiForgery should check request for same origin or not.

Declaration
public bool EnableSameOriginCheck { get; set; }
Property Value
Type Description
System.Boolean

SameSiteAttributeValue

Declaration
public SameSiteType SameSiteAttributeValue { get; set; }
Property Value
Type Description
SameSiteType

Extension Methods