【问题标题】:how to set HttpOnly and Secure flag set in apache2.4.6 and tomcat如何在apache2.4.6和tomcat中设置HttpOnly和Secure标志
【发布时间】:2013-12-22 07:02:53
【问题描述】:

我在 suselinux 中有一个 apache2.4.6 和 dotcms2.3.2。我想在 dotcms 和 tomcat 中设置 httponly 和安全 falg 。我在 apache 和 tomcat 中设置了这些配置: <Context useHttpOnly="true">context.xml <Connector maxThreads="400" connectionTimeout="3000" port="8080" protocol="HTTP/1.1" redirectPort="8443" URIEncoding="UTF-8" secure="true" /> in server.xml

Header edit Set-Cookie ^(.*)$ $1;HttpOnly   

Header set Set-Cookie HttpOnly;Secure

httpd.conf.

之后重新启动 tomcat 并使用 burp suite 进行测试,但它没有在 cookie 中设置。

【问题讨论】:

  • Salam:-D Header edit Set-Cookie ^(.*)$ $1;HttpOnly 应该可以工作,除非未安装 mod_headers!或标题不存在!

标签: apache security httponly


【解决方案1】:
Header set Set-Cookie HttpOnly;Secure 

httpd.conf 有效。

【讨论】:

  • 它会覆盖会话 cookie。
猜你喜欢
  • 2021-12-30
  • 2013-04-10
  • 2017-11-17
  • 2012-12-12
  • 1970-01-01
  • 1970-01-01
  • 2013-02-13
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多