本文介绍了设置了与跨站点资源关联的Cookie,但未设置"SameSite"属性.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Chrome向我发出以下警告:

Chrome is giving me the following warning:

请注意,quilljs.com是第三方域名.

我已经看到这些 ,两个问题的答案都相似,有人说像这样:

I have seen these questions, the answers on both questions are similar, some say something like this:

其他人提供这样的答案:

While others provide an answer like this:

response.setHeader("Set-Cookie", "HttpOnly;Secure;SameSite=Strict");

我不确定这是否是我需要在网站上修复的东西,还是应该在第三方库中修复的东西?

I am not sure if this is something that I need to fix in my website, or is it something that should be fixed on the 3rd party library?

推荐答案

警告消息专门指出了负责Cookie的域.在这种情况下,它是quilljs.com.如果那是您的域,那么您需要在那里更新cookie.如果这是您依赖的第三方服务,则该服务需要更新其Cookie.

The warning messages specifically call out the domain that's responsible for the cookie. In this case, it's quilljs.com. If that's your domain, then you need to update the cookie there. If it's a third-party service that you rely on, then it's that service that needs to update their cookies.

修改 https://web.dev/samesite-cookies-explained https://web.dev/samesite-cookie-recipes .

这篇关于设置了与跨站点资源关联的Cookie,但未设置"SameSite"属性.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 13:44