开发者

Domains and cookie accessibility

开发者 https://www.devze.com 2022-12-10 10:29 出处:网络
If I am hitting www.foo.com and am writing some cookies there, will I have access to thos开发者_如何学Pythone cookies if I hit the same code base from www2.foo.com?Or does the cross-domain cookie secu

If I am hitting www.foo.com and am writing some cookies there, will I have access to thos开发者_如何学Pythone cookies if I hit the same code base from www2.foo.com? Or does the cross-domain cookie security come into play with sub-domains as well?


If you set a cookie's domain as .example.com, it'll be available across all subdomains. If you set the domain as www.example.com, it'll only be accessible to the www subdomain.


Cookies set for foo.com will be accessible by sub-domains. Sub-domain cookies are not accessible by other sub-domains.

0

精彩评论

暂无评论...
验证码 换一张
取 消