关于javascript:设置了与跨站点资源相关联的Cookie,但未设置” SameSite”属性。

A cookie associated with a cross-site resource was set without the `SameSite` attribute

Chrome给我以下警告:

A cookie associated with a cross-site resource at http://quilljs.com/
was set without the SameSite attribute. A future release of Chrome
will only deliver cookies with cross-site requests if they are set
with SameSite=None and Secure.

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

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

nothing to do with your code. its something their web servers will
have to support.

其他人提供这样的答案:

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

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


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

编辑
有关更多上下文的信息,请参见https://web.dev/samesite-cookies-explained和https://web.dev/samesite-cookie-recipes。