SameSiteMode Enum

Definition

Used to set the SameSite field on response cookies to indicate if those cookies should be included by the client on future "same-site" or "cross-site" requests. RFC Draft: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.1

C#
public enum SameSiteMode
Inheritance
SameSiteMode

Fields

Name Value Description
Unspecified -1

No SameSite field will be set, the client should follow its default cookie policy.

None 0

Indicates the client should disable same-site restrictions.

Lax 1

Indicates the client should send the cookie with "same-site" requests, and with "cross-site" top-level navigations.

Strict 2

Indicates the client should only send the cookie with "same-site" requests.

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