最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin2浏览0评论

Chrome is giving me the following warning:

A cookie associated with a cross-site resource at / 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.

Note that quilljs is a 3rd party domain.

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

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

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?

Chrome is giving me the following warning:

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.

Note that quilljs.com is a 3rd party domain.

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

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

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?

Share Improve this question edited Jan 27, 2020 at 1:17 Hooman Bahreini asked Nov 13, 2019 at 4:20 Hooman BahreiniHooman Bahreini 15.6k11 gold badges81 silver badges155 bronze badges 1
  • 1 I get the same error for other libraries as well, such as: A cookie associated with a cross-site resource at cloudflare.com was set without the SameSite attribute – Hooman Bahreini Commented Dec 25, 2019 at 0:55
Add a comment  | 

1 Answer 1

Reset to default 18

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.

Edit More context is available at https://web.dev/samesite-cookies-explained and https://web.dev/samesite-cookie-recipes.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论