【问题标题】:Cannot communicate with Apache server and tomcat after configuring Apache with SSL and cookies to httponly and secure?使用 SSL 和 cookie 将 Apache 配置为 httponly 和安全后,无法与 Apache 服务器和 tomcat 通信?
【发布时间】:2014-01-30 09:20:00
【问题描述】:

我已经将我的 Apache 服务器配置为使用代理解析器(也使用反向代理)与 tomcat 通信,该解析器为 Apache 服务器而不是 tomcat 服务器启用了 ssl。 当我添加

Header set Set-Cookie HttpOnly;Secure   

httpd.conf,我可以通过代理解析器向tomcat发送请求,但从tomcat我无法向Apache发送请求。

我已在 tomcat 和 Apache 服务器中启用 cookie。

在将 cookie 设置为 httponly 并对其进行保护之前,它可以正常工作。当将 cookie 设置为安全和 httponly 时,我可以从开发人员工具中看到请求和响应缺少会话 cookie。

为什么请求和响应中缺少会话 cookie?

【问题讨论】:

    标签: apache tomcat7 session-cookies


    【解决方案1】:

    很遗憾,我无法回答,但我可以确认。我也刚刚经历过:在 Tomcat 7 (jre7) 下,安全响应 cookie(即cookie.setSecure(true))在后续请求中不可用。当我注释掉 setSecure 调用时,它们会重新出现。

    【讨论】:

      猜你喜欢
      • 2012-12-23
      • 2014-11-09
      • 2014-06-20
      • 2015-07-29
      • 2017-04-19
      • 2019-04-23
      • 1970-01-01
      • 2015-09-17
      • 2016-12-30
      相关资源
      最近更新 更多