CSRF
Last updated
Last updated
from mozilla
The possible attribute values are:
The request is a top-level navigation: this essentially means that the request causes the URL shown in the browser's address bar to change.
Send the cookie with both cross-site and same-site requests. The Secure
attribute must also be set when using this value.
Send the cookie only for requests originating from the same that set the cookie.
Send the cookie only for requests originating from the same that set the cookie, and for cross-site requests that meet both of the following criteria:
This would exclude, for example, requests made using the API, or requests for subresources from or elements, or navigations inside elements.
It would include requests made when the user clicks a link in the top-level browsing context from one site to another, or an assignment to , or a submission.
The request uses a method: in particular, this excludes , , and .
Some browsers use Lax
as the default value if SameSite
is not specified: see for details.
Note: When Lax
is applied as a default, a more permissive version is used. In this more permissive version, cookies are also included in requests, as long as they were set no more than two minutes before the request was made.