Cookie.HTTPOnly在传统的ASP [英] Cookie.HTTPOnly in classic ASP
问题描述
如何在一个页面中的所有Cookie变量设置为中HTTPOnly在ASP?
How to set all the cookie variables in a page to HTTPOnly in ASP?
推荐答案
我怕用Response.Cookies集合设置时,仅Http将无法正常工作(它已经让我慢慢地疯了!)。
如VBScript(嗯,至少在服务器上我测试的)将字符连接code中的分号。
I'm afraid using the Response.Cookies collection will not work when setting HttpOnly (it's been driving me slowly mad!). As vbscript (well at least on the server i'm testing on) will character encode the semicolon.
相反,手动添加自己的头,例如:
Instead, add the header manually yourself, for example:
Response.AddHeader "Set-Cookie", "YourCookieName=YourCookieValue; path=/; HttpOnly"
有一个类似的帖子计算器上叫:<一href=\"http://stackoverflow.com/questions/55296/how-exactly-do-you-configure-httponly-cookies-in-asp-classic\">How你究竟在ASP经典配置的HttpOnly饼干?
There is a similar post on stackoverflow called: How exactly do you configure httpOnly Cookies in ASP Classic?
这篇关于Cookie.HTTPOnly在传统的ASP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!