Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
SameSiteMode Enum
Definition
- Namespace:
- Microsoft.AspNetCore.Http
- Assembly:
- Microsoft.AspNetCore.Http.Features.dll
- Package:
- Microsoft.AspNetCore.App.Ref v10.0.0
- Package:
- Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
- Package:
- Microsoft.AspNetCore.Http.Features v2.0.0
- Package:
- Microsoft.AspNetCore.Http.Features v2.1.0
- Package:
- Microsoft.AspNetCore.Http.Features v2.2.0
- Package:
- Microsoft.AspNetCore.Http.Features v3.0.3
- Package:
- Microsoft.AspNetCore.Http.Features v3.1.18
- Package:
- Microsoft.AspNetCore.Http.Features v5.0.9
- Package:
- Microsoft.AspNetCore.App.Ref v6.0.36
- Package:
- Microsoft.AspNetCore.App.Ref v7.0.5
- Package:
- Microsoft.AspNetCore.App.Ref v8.0.19
- Package:
- Microsoft.AspNetCore.App.Ref v9.0.8
- Source:
- SameSiteMode.cs
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
public enum class SameSiteMode
public enum SameSiteMode
type SameSiteMode =
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
Feedback
Was this page helpful?
