开发者社区> 问答> 正文

tornado如何设置 cookie的保留字段的值?报错

急求:

需要对cookie设置超时时间与domain,但是一直报错

CookieError: Attempt to set a reserved key: domain  (expires)


请问有什么方法进行设置啊,我用的是

self.set_secure_cookie('domain','.xxxx.com')

展开
收起
爱吃鱼的程序员 2020-06-20 17:25:06 344 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
    1. 善用搜索引擎
    2. 错误提示很明确了,看不明白不要忽略。
    3. cookie名称换下,不要用保留字
    我现在就是要重新给他们赋值啊。self.set_secure_cookie('key','value',path='/',domain='.xxx.com',secure=True,expires=expirestime)这样毫无效果啊
    2020-06-20 17:25:23
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载