Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/246.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何修复SameSite属性警告?_Php_Cookies_Attributes_Samesite - Fatal编程技术网

Php 如何修复SameSite属性警告?

Php 如何修复SameSite属性警告?,php,cookies,attributes,samesite,Php,Cookies,Attributes,Samesite,我解决这个问题重要吗?我如何解决这个问题?我在我的网站顶部添加了这个,但没有解决任何问题 一般来说,这些警告目前只是提供信息,不会影响您的网站行为。不过,由于在2020年2月左右达到稳定,这些将成为Chrome 80的默认值 在本例中,cookie来自https://cloudflare.com。因为这不是你的领域,你在网站代码中的任何内容都不会影响cookie。这里有两件事需要检查: 如果CloudFlare cookie是您在那里的帐户中明确设置的内容,例如,可能通过worker设置cook

我解决这个问题重要吗?我如何解决这个问题?我在我的网站顶部添加了这个,但没有解决任何问题


一般来说,这些警告目前只是提供信息,不会影响您的网站行为。不过,由于在2020年2月左右达到稳定,这些将成为Chrome 80的默认值

在本例中,cookie来自
https://cloudflare.com
。因为这不是你的领域,你在网站代码中的任何内容都不会影响cookie。这里有两件事需要检查:

  • 如果CloudFlare cookie是您在那里的帐户中明确设置的内容,例如,可能通过worker设置cookie,那么您需要更新那里的
    SameSite
    属性
  • 如果此cookie来自您不负责的CloudFlare功能,则无需采取行动。CloudFlare负责管理这些cookie并更新属性
  • 因此,您的网站是安全的,但不会影响您网站之外的cookie。您可以查看更多上下文

    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.