jboss4.2.3 屏蔽响应头server信息

1.修改配置deploy/jboss-web.deployer/service.xml

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"    server="Microsoft-IIS/8.5"/>

如上增加:server: 内容自己定。

2.修改配置deploy/jboss-web.deployer/conf/web.xml

  <!-- ================== Common filter Configuration ==================== -->
    <filter>
       <filter-name>CommonHeadersFilter</filter-name>
       <filter-class>org.jboss.web.tomcat.filters.ReplyHeaderFilter</filter-class>
    <!--   <init-param> -->
    <!--      <param-name>X-Powered-By</param-name>  -->
    <!--      <param-value>Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807     181439)/JBossWeb-2.0</param-value>  -->
    <!--   </init-param>  -->
    </filter>

posted @ 2018-07-30 18:36  有梦就能实现  阅读(431)  评论(0编辑  收藏  举报