且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在同一域上为iframe设置Cookie

更新时间:2022-05-09 00:05:52

对于后代,这是答案来自 @ AskoSoukka 在上面的评论中被识别并接受:

For posterity, here's the answer from @AskoSoukka identified and "accepted" in the comments above:


存储在您的浏览器中的实际cookie是什么样的?可能需要在setCookie kwargs中显式指定path = /才能使其在整个域中正常工作。

How does the actual cookie stored in you browser look like? Probably, you need to explicitly specify path="/" in setCookie kwargs to make it work for the whole domain.