【发布时间】:2015-09-25 08:30:17
【问题描述】:
我使用 BedSheet 编写了一个简单的站点来测试添加 cookie。当我运行代码并使用 firebug 检查 cookie 时,我发现了一个我没有添加的额外 cookie,名为 fanws(值为 06e3d816-7626-7b00-205a-0013e8a56e9d-dbc9c6c8fa03cfa4)。
这是我的代码:
class Site
{
@Inject HttpCookies? cookie
@Contribute { serviceType=Routes# }
static Void contributeRoutes(Configuration Conf)
{
Conf.add(Route(`/index.html`, Site#index))
}
Text index()
{
cookie.add(Cookie("foo", "123"))
return Text.fromHtml("<h1> Hello </h1>")
}
}
这是什么饼干?这有什么用途?这个值是从哪里来的?
【问题讨论】:
标签: cookies fantom afbedsheet