使用百度统计后,Chrome浏览器报错跨站点资源相关联的cookie被设置为不具有“ SameSite”属性

作者: 站长 上传时间: 浏览: N/A 下载: N/A 格式: N/A 评分: N/A


A cookie associated with a cross-site resource at http://hm.baidu.com/ was set without the `SameSite` attribute. It has been blocked, as Chrome now only delivers cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.

与http://baidu.com/上的跨站点资源相关联的cookie被设置为不具有“ SameSite”属性。它已被阻止,因为Chrome现在仅在跨站点请求中将Cookie设置为“ SameSite = None”和“ Secure”时才发送。您可以在“应用程序”>“存储”>“ Cookies”下的开发人员工具中查看Cookie,并在https://www.chromestatus.com/feature/5088147346030592和https://www.chromestatus.com/feature/5633521622188032上查看更多详细信息。

response.setHeader 在哪儿设置 lnmp?

解决办法:
在header.php文件顶部加入

Leave a Comment