Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我已经为我的应用服务器设置了 SSL,我还需要为 cookie 设置 HttpOnly 吗?
是的。这两个标志彼此无关(虽然都是安全/隐私选项)
“安全”意味着 cookie 将仅通过加密连接发送
“HttpOnly”表示 cookie 对 Javascript 不可见
例如,您仍然可以在 HTTPS 页面上使用 XSS(然后恶意脚本可能会吃掉您的 cookie)。