我想在Tomcat级别设置两个头信息。如果在Apache级别设置这些头信息,将会影响我的应用程序。 以下是两个头信息:
Set-Cookie HttpOnly;
Secure Strict-Transport-Security: max-age=31536000; includeSubDomains
<filter>
<filter-name>HTTP Header Security Filter</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
<init-param>
<param-name>hstsMaxAgeSeconds</param-name>
<param-value>31536000</param-value>
</init-param>
<init-param>
<param-name>hstsIncludeSubDomains</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>HTTP Header Security Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
有关详细信息,请阅读文档。
httpd
? - Dusan Bajic