我在 suselinux 中有一个 apache2.4.6 和 dotcms2.3.2。我想在 dotcms 和 tomcat 中设置 httponly 和 secure 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" />
中的 server.xml
Header edit Set-Cookie ^(.*)$ $1;HttpOnly
或者
Header set Set-Cookie HttpOnly;Secure
在
httpd.conf
中。之后重新启动 tomcat 并使用 burp suite 进行测试,但它没有在 cookie 中设置。
最佳答案
Header set Set-Cookie HttpOnly;Secure
在
httpd.conf
工作。关于apache - 如何在 apache2.4.6 和 tomcat 中设置 HttpOnly 和 Secure 标志,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/20727076/