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.
我一直在使用 Java Web 应用程序,并且通过使用 cookie.setSecure(true) 将我的 cookie 设置为安全的。
问题是当我运行我的应用程序并尝试使用 Chrome 或 IE 访问它时,设置为安全的 cookie 不会出现,即使它们是在 HTTP 响应中设置的。
但是,如果我尝试使用 Firefox 访问我的网络应用程序,cookie 工作正常。
我的环境:
有人对此有什么想法吗?
谢谢
这可能是因为您没有使用 SSL 连接。某些浏览器仅在通过 SSL 传输时发送标记为安全的 cookie。
参考:https ://www.owasp.org/index.php/SecureFlag