XpoweredBy not working in Web logic

早过忘川 提交于 2019-12-08 08:56:01

问题


I have used weblogic server 10.3. have to hide the X-Powered-By: Servlet/2.5 JSP/2.1 from header response for that i did the following

In weblogic admin console, under domainName->Configuration->Web Application, I set 'X-Powered-By Header ' to "X-Powered-By Header will not be sent".

It's working fine in local. but not working in server side.even though i cleared temp files and restart the server many times.

I tried by adding the following in web.xml also

<context-param>
    <param-name>com.sun.faces.sendPoweredByHeader</param-name>
    <param-value>false</param-value>
</context-param>

In php.ini locate the line containing “expose_php On” and set it to Off:

expose_php = Off

similarly how we hide that in java web application.

thanks in advance for your help


回答1:


If you have an apache server with module header, you can try :

<IfModule mod_headers.c>  
  Header unset X-Powered-By
</IfModule>

As describe in http://www.shanison.com/2012/07/05/unset-apache-response-header-protect-your-server-information/



来源:https://stackoverflow.com/questions/20421329/xpoweredby-not-working-in-web-logic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!