域的cookie被发送到子域,如何解决? [英] Cookies of domain are sent to subdomain, how to fix?
本文介绍了域的cookie被发送到子域,如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我转到sub.domain.tld时,Firefox会发送我的.domain.tldcookie。
如何确保浏览器只发送.sub.domain.tld而不是.domain.tld的Cookie?
解决方案
你不能。如果您在 .domain.tld
上设置了一个cookie,它将被发送到 domain.tld
和所有子域。 p>
虽然这可能与您的问题无关,请查看 sstatic.net - Stack Overflow系列网站托管其静态资源。
Firefox is sending my ".domain.tld" cookies when I go to sub.domain.tld.
How can I make sure that the browser only sends cookies of ".sub.domain.tld" and not ".domain.tld"?
解决方案
You cannot. If you set a cookie on .domain.tld
it will be sent to domain.tld
and all subdomains.
Although this may be unrelated to your problem, take a look at sstatic.net - where the Stack Overflow family of sites host their static resources.
这篇关于域的cookie被发送到子域,如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文