CSRF Protection
Understanding the SameSite cookie attribute

Understanding the SameSite cookie attribute

10/2/2023

What this post added

This post details the `SameSite` cookie attribute, explaining its three values: `Strict` (cookie sent only if the request originates from the same site, ideal for high-security applications), `Lax` (cookie sent for top-level navigations but not cross-site subresource requests, balancing usability and security), and `None` (cookie sent with every request, including cross-site, but requires the `Secure` attribute for HTTPS transport). It also touches upon the default browser behavior of treating unset `SameSite` as `Lax` and the importance of the `Secure` attribute when using `SameSite=None`.

Read the original post ↗