当 SSL 已设置时,还需要 HttpOnly 吗?
如果我已经为应用程序服务器设置了 SSL,是否还需要为 cookie 设置 HttpOnly?
If I already set SSL for my application server, do I still need to set HttpOnly for the cookies?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。这两个标志彼此无关(不过,两者都是安全/隐私选项)
“安全”意味着 cookie 只会通过加密连接发送
“HttpOnly”意味着 Cookie 对 Javascript 不可见
例如,您仍然可能在 HTTPS 页面上存在 XSS (和那么邪恶的脚本可能会吃掉你的饼干)。
Yes. The two flags have nothing to do with each other (both are security/privacy options, though)
"Secure" means that the cookie will only be sent over encrypted connections
"HttpOnly" means that the cookie will not be visible to Javascript
You could still have XSS on an HTTPS page, for example (and then an evil script could eat your cookie).