Indicate whether to send a cookie in a cross-site request by specifying its SameSite attribute
Because a cookie’s SameSite attribute was not set or is invalid, it defaults to SameSite=Lax, which will prevent the cookie from being sent in a cross-site request in a future version of the browser. This behavior protects user data from accidentally leaking to third parties and cross-site request forgery.
Resolve this issue by updating the attributes of the cookie:
Specify SameSite=None and Secure if the cookie should be sent in cross-site requests. This enables third-party use.
Specify SameSite=Strict or SameSite=Lax if the cookie should not be sent in cross-site requests
https://www.chromestatus.com/feature/5088147346030592
https://www.chromestatus.com/feature/5633521622188032
本文讲解如何通过设置Cookie的SameSite属性来防止跨站请求伪造(CSRF)。SameSite属性可设定为None、Secure、Strict或Lax,以控制Cookie是否在跨站请求中发送,保护用户数据不被意外泄露。
88

被折叠的 条评论
为什么被折叠?



