<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Heck's  Blog]]></title> 
<link>https://www.heckjj.com/index.php</link> 
<description><![CDATA[一瞬间的决定，往往可以改变很多，事实上，让自己成功的往往不是知识，是精神！ 如果你总是为自己找借口，那只好让成功推迟。执行力，今天！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Heck's  Blog]]></copyright>
<item>
<link>https://www.heckjj.com/x-powered-by-jsf-http-header/</link>
<title><![CDATA[如何隐藏JSF应用中的HTTP Header信息]]></title> 
<author>Heck &lt;@hecks.tk&gt;</author>
<category><![CDATA[编程杂谈]]></category>
<pubDate>Mon, 20 Sep 2010 18:46:38 +0000</pubDate> 
<guid>https://www.heckjj.com/x-powered-by-jsf-http-header/</guid> 
<description>
<![CDATA[ 
	<span style="font-family: 微软雅黑;">对于JSF的应用，你可能会在HTTP的头信息中看到这样的字样：<br/><br/>Server : Apache/2.0.61 (Unix) <br/>X-Powered-By : JSF/1.2<br/><br/>让用户知道这些消息没有太大意义，而且可能造成安全漏洞。需要屏蔽的话可以参考以下步骤：<br/><br/><strong>隐藏Server信息</strong>：在apache里控制的,在httpd.conf里加入一行<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;ServerTokens Prod<br/><br/><strong>隐藏X-Powered-By</strong>：在web.xml中加入：</span><br/><textarea name="code" class="xml" rows="15" cols="100">
<context-param>
&nbsp;&nbsp;&nbsp;&nbsp;<param-name>com.sun.faces.sendPoweredByHeader</param-name>
&nbsp;&nbsp;&nbsp;&nbsp;<param-value>false</param-value>
</context-param>
</textarea><br/><span style="font-family: 微软雅黑;">对于JBoss，需要找到这个文件：<JBOSS_HOME>&#92;server&#92;default&#92;deploy&#92;jboss-web.deployer&#92;conf&#92;web.xml，然后加入以下代码：</span><br/><textarea name="code" class="xml" rows="15" cols="100">
<filter>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<filter-name>CommonHeadersFilter</filter-name>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<filter-class>org.jboss.web.tomcat.filters.ReplyHeaderFilter</filter-class>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<init-param>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <param-name>X-Powered-By</param-name>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <param-value>Servlet 2.4; JBoss-4.2.0.GA (build:
SVNTag=JBPAPP_4_2_0_GA date=200706281411)/Tomcat-5.5</param-value>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</init-param>
&nbsp;&nbsp; </filter>
↓
&nbsp;&nbsp; <filter>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<filter-name>CommonHeadersFilter</filter-name>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<filter-class>org.jboss.web.tomcat.filters.ReplyHeaderFilter</filter-class>
&nbsp;&nbsp; </filter>
</textarea><br/>Tags - <a href="https://www.heckjj.com/tags/x-powered-by/" rel="tag">x-powered-by</a> , <a href="https://www.heckjj.com/tags/jsf/" rel="tag">jsf</a>
]]>
</description>
</item><item>
<link>https://www.heckjj.com/x-powered-by-jsf-http-header/#blogcomment</link>
<title><![CDATA[[评论] 如何隐藏JSF应用中的HTTP Header信息]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://www.heckjj.com/x-powered-by-jsf-http-header/#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>