Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试返回为 example.com 和 www.example.com 设置 cookie 的响应。我只能为请求来源的域设置 cookie。有人可以指出我正确的方向吗?
啊! set_cookie() 有一个域参数。
response.set_cookie('name', 'value', domain='.example.com')
问题解决了。