A cookie associated with a cross-site resource at http://XXX.XXX.XXX.XXXX/ 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`.
在cookie中追加属性 secure; SameSite=None
http {
...
map $http_user_agent $samesite_attr {
"~*chrome" ';Secure;SameSite=None';
}
...
server {
location / {
...
proxy_cookie_path ~/(.*) "/$1$samesite_attr";
}
}
}
Chrome访问地址 chrome://flags/ 搜索"SameSite",修改配置项如图