A cookie associated with a cross-site resource at https://cloudflare.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`. 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.我解决这个问题很重要吗?我该怎么解决这个问题?我在我的网站顶部添加了这个,但是它没有解决任何问题。
<?php
header('Set-Cookie: cross-site-cookie=name; SameSite=None; Secure');
?>发布于 2019-11-04 11:12:12
作为一个一般性的注意,这些警告是纯粹的信息在目前,并没有影响您的网站的行为。这些将成为默认的Chrome 80,但由于稳定在2020年2月左右。
在这种情况下,cookie来自https://cloudflare.com。因为这不是您的域,所以您在站点代码中所放的任何内容都不会影响到该cookie。这里有两件事要检查:
SameSite属性。因此,您的PHP代码看起来很好,但它不会影响cookies以外的网站。您可以检查https://web.dev/samesite-cookies-explained以获得更多上下文。
https://stackoverflow.com/questions/58683791
复制相似问题