CookieOptions.SameSite Property

Definition

Gets or sets the value for the SameSite attribute of the cookie. The default value is Unspecified

C#
public Microsoft.AspNetCore.Http.SameSiteMode SameSite { get; set; }

Property Value

The SameSiteMode representing the enforcement mode of the cookie.

Applies to

Product Versions
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0