微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

通过指定其 SameSite 属性来指示是否在跨站点请求中发送 cookie

如何解决通过指定其 SameSite 属性来指示是否在跨站点请求中发送 cookie

我创建了一个 angular 应用程序,我进行了 gmail 身份验证,但它给了我一个 chrome 错误

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 prevents the cookie from being sent in a cross-site request. 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.

我找到了很多解决方案,可惜我不知道如何解决这个问题。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。