【发布时间】: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!或标题不存在!