java在哪里可以在JBOSS 6.4的服务器级别设置contentSecurityPolicy和strictTransportSecurity响应头?
我必须在JBOSS 6.4服务器级别添加contentSecurityPolicy和strictTransportSecurity响应头。在做了一些研究之后,我发现这些头应该添加到WildFly(以前称为JBOSS应用服务器)的undertow子系统下。我得到了一个重要信息,即wildifly中新引入了undertow子系统,它取代了jboss web子系统
当我使用JBOSS 6.4时,我在我的JBOSS standalone xml配置文件中发现了相同的JBOSS web子系统,并在该子系统标记中添加了以下两个阀门
**<valve name="contentSecurityPolicy" module="qmatic-valve-lib" class-
name="com.qmatic.httpresponse.HttpResponseHeaderValve">
<param param-name="responseHeaderName" param-value="Content-Security-Policy"/>
<param param-name="responseHeaderValue" param-value="*"/>
</valve>**
**<valve name="strictTransportSecurity" module="qmatic-valve-lib" class-
name="com.qmatic.httpresponse.HttpResponseHeaderValve">
<param param-name="responseHeaderName" param-value="Strict-Transport-Security"/>
<param param-name="responseHeaderValue" param-value="max-age=31536000; includeSubDomains"/>
</valve>**
但是,在完成上述操作后,我在服务器启动期间发现qmatic valve lib模块未发现异常。我通过互联网得到了上述解决方案,但运气不好
有人能帮我在JBoss6.4服务器级别配置上面提到的两个响应头吗。提前谢谢
问候,, 礼节
共 (0) 个答案