配置“ /; SameSite = None; Secure” Cookie Javascript

时间:2020-01-03 16:48:06

标签: javascript cookies

我尝试将上述配置设置为cookie,但仍然收到以下警告:

A cookie associated with a cross-site resource at http://s426.altervista.org/ 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.

Cookie配置:

<script>
    !function(d,l,e,s,c){
            e=d.createElement("script");
            e.src="//ad.altervista.org/js.ad/size=728X90/ref="+encodeURIComponent(l.hostname+l.pathname)+"&r="+Date.now()+"/;SameSite=None;Secure";
            s=d.scripts;
            c=d.currentScript||s[s.length-1];
            c.parentNode.insertBefore(e,c)}(document,location)
</script>

有人可以帮我吗?

0 个答案:

没有答案