查找导致Chrome的SameSite警告的Cookie [英] Find the cookie that causes Chrome's SameSite warning

查看:441
本文介绍了查找导致Chrome的SameSite警告的Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如您所知,Chrome将在本月开始使用新的SameSite Cookie策略(



自从引入新政策越来越近了,我尝试使用Chrome开发人员工具中的应用程序视图查找有问题的Cookie。显示的内容如下:





这些更改之后,我在控制台中看到一条消息,告诉我Cookie被阻止。



< a href = https://i.stack.imgur.com/XqxFe.png rel = nofollow noreferrer>



但是Chrome开发人员工具中的应用程序视图显示的Cookie与以前完全相同。



此外,我浏览了开发人员工具网络视图中的每个条目。没有任何条目的 Cookie 标签。



这非常令人沮丧,因为我不知道被阻止的cookie是否与应用程序的功能。



有没有办法找出哪个cookie被阻止了? Chrome不能仅在将Cookie写入控制台的警告中提及Cookie吗?

解决方案

此处提供了深入的调试指南:
https://www.chromium。 org / updates / same-site / test-debug



作为tl; dr


  1. 在网络面板中,选择一个请求,转到 Cookies子选项卡,选中显示过滤出的请求cookie,您可以看到每个cookie以及未包含的cookie

  2. 从Chrome捕获NetLog转储,您可以详细检查特定的阻止事件。


As some of you know, Chrome will start using a new SameSite cookie policy this month (https://web.dev/samesite-cookies-explained/ and https://www.chromium.org/updates/same-site).

We are using Auth0 for our App and have seen this SameCookie warning in Chrome's console since the end of last year:

Now since introduction of the new policy is getting closer, I tried to find the offending cookie using the Application view in Chrome's developer tools. This is what is shows:

As you can see, there is no entry for Secure or SameSize for any cookie.

So I enabled the new policy to see what will change. This can be done in chrome://flags

After these changes I see a message in the console, telling me that a cookie was blocked.

But the Application view in Chrome's developer tools shows exactly the same cookies as before.

Also, I went through each entry in the developer tools Network view. There is no Cookie tab for any of the entries.

This is very frustrating, as I do not know if thee blocked cookie is relevant for the functioning of our application.

Is there a way to find out which cookie was blocked? Can't Chrome just mention the cookie in the warning that it writes into the console?

解决方案

We've put together a more in-depth debugging guide here: https://www.chromium.org/updates/same-site/test-debug

As a tl;dr

  1. In the Network panel, select a request, go to the Cookies sub-tab, check the "show filtered out request cookies", and you can see each cookie along with the ones that were not included
  2. Capture a NetLog dump from Chrome and you can examine this in detail for the specific blocking events.

这篇关于查找导致Chrome的SameSite警告的Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆