为什么 cfcookie 不允许将 domain= 设置为 CFID/CFTOKEN 的子域? [英] why doesn't cfcookie allow setting domain= to a subdomain for CFID/CFTOKEN?

查看:14
本文介绍了为什么 cfcookie 不允许将 domain= 设置为 CFID/CFTOKEN 的子域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<cfcookie name="CFID" value="#session.cfid#" domain=".demo.labs.dev">

产量:

设置 Cookie:CFID=4215;Domain=.labs.dev; Expires=Sat,2043 年 7 月 4 日格林威治标准时间 01:43:49;路径=/;HttpOnly

Set-Cookie: CFID=4215; Domain=.labs.dev; Expires=Sat, 04-Jul-2043 01:43:49 GMT; Path=/; HttpOnly

但是如果我直接使用<cfheader>:

<cfheader name="Set-Cookie"
      value="CFID=4212; Domain=.demo.labs.dev; Expires=Sat, 04-Jul-2043 01:37:03 GMT; Path=/; HttpOnly">

产量:

设置 Cookie:CFID=4212;Domain=.demo.labs.dev; Expires=Sat,格林威治标准时间 2043 年 7 月 4 日 01:37:03;路径=/;HttpOnly

Set-Cookie: CFID=4212; Domain=.demo.labs.dev; Expires=Sat, 04-Jul-2043 01:37:03 GMT; Path=/; HttpOnly

这正是我想要的.

为什么 <cfcookie> 会这样?当前的解决方法是改用 <cfheader>.

Why does <cfcookie> behave this way? Current workaround would be using <cfheader> instead.

推荐答案

显然现在已经修复了...

Apparently it is now fixed...

https://bugbase.adobe.com/index.cfm?event=bug&id=3593673

这篇关于为什么 cfcookie 不允许将 domain= 设置为 CFID/CFTOKEN 的子域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆