域的cookie被发送到子域,如何解决?

编程入门 行业动态 更新时间:2024-10-11 13:27:57
本文介绍了域的cookie被发送到子域,如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我转到sub.domain.tld时,Firefox会发送我的.domain.tldcookie。

如何确保浏览器只发送.sub.domain.tld而不是.domain.tld的Cookie?

解决方案

你不能。如果您在 .domain.tld 上设置了一个cookie,它将被发送到 domain.tld 和所有子域。 p>

虽然这可能与您的问题无关,请查看 sstatic - 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 - where the Stack Overflow family of sites host their static resources.

更多推荐

域的cookie被发送到子域,如何解决?

本文发布于:2023-11-15 16:21:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1596036.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:发送到   如何解决   cookie

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!