移除jboss响应中的中间件信息
JBoss 4.2
Suppressing the X-Powered-By header in JBoss 4.2.x can be done by modifying the web.xml file located in ${jboss.home}/server/${server.instance.name}/deploy/jboss-web.deployer/conf/. For example, if you are using the 'default' instance and running jboss 4.2.3 from /usr/local, the path to the configuration file would be /usr/local/jboss-4.2.3.GA/server/default/deploy/jboss-web.deployer/conf/. Locate the Common Filter Configuration line (line 25 on a stock 'default' server instance configuration file) and comment out the lines for the init-param, param-name, and param-value entries. Example below
<!-- ================== 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>
Restart JBoss and the header will no longer show up.
JBoss 5.0 & JBoss 5.1
The web.xml file that needs to be updated is located in a different location than with JBoss 4,2 but the technique is the same. To suppress the X-Powered-By header under JBoss 5.0, comment out the init-param, param-name, and param-value line entries from the web.xml located in ${jboss.home}server/${server.instance.name}/deployers/jbossweb.deployer/.
<!-- ================== 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.5; JBoss-5.0/JBossWeb-2.1</param-value> -->
<!-- </init-param> -->
Once you have made the configuration changes, restart JBoss so they can take effect.
JBoss 6.0, JBoss 7.0, JBoss 7.1
In order to suppress the X-Powered-By header in JBoss 6, 7, or 7.1, you no longer make changes to web.xml files but instead modify the catalina.properties file included with your server instance. Edit the catalina.properties file located in ${jboss.home}/server/${server.instance.name}/deploy/jbossweb.sar/. Locate the property named: org.apache.catalina.connector.X_POWERED_BY and set its value to false. Restart the server and you're all set.
移除jboss响应中的中间件信息的更多相关文章
- 移除http响应中的多余的头(X-AspNet-Version,Server等)
网上搜索出很多方法了,这里记录一下: 如果是asp.net mvc的话还得在global.ascx中加入: 至于移除Server头,按网上的写法写httpmoudle后发现无效的,最后还是用了微软官方 ...
- 如何移除网站Response Headers中的X-Powered-By信息?
X-Powered-By是网站响应头信息其中的一个,出于安全的考虑,一般会修改或删除掉这个信息. 如果你用的node.js express框架,那么X-Powered-By就会显示Express.如果 ...
- MVC页面移除HTTP Header中服务器信息
默认情况下,每一个MVC请求的HTTP Header中都会包含着当前服务器的一些信息,出于安全还是性能还是处女座的强迫症等等,都想把这些信息移除掉,增加一些应用程序的神秘感,如下,默认情况下Chrom ...
- python接口自动化测试二十七:密码MD5加密 ''' MD5加密 ''' # 由于MD5模块在python3中被移除 # 在python3中使用hashlib模块进行md5操作 import hashlib # 待加密信息 str = 'asdas89799,.//plrmf' # 创建md5对象 hl = hashlib.md5() # Tips # 此处必须声明encode # 若写法为
python接口自动化测试二十七:密码MD5加密 ''' MD5加密 '''# 由于MD5模块在python3中被移除# 在python3中使用hashlib模块进行md5操作import has ...
- php笔记06:http响应中的状态码
首先我们看一个360浏览器中使用开发截图如下: 上面的Status Code: OK (这个就是状态码) 1.状态码主要用于服务器对请求的处理结果,它是一个三位的十进制数.响应状态码分为5类,如下所 ...
- PowerShell_零基础自学课程_6_PS中获取帮助信息详解、管道、格式化输
前些文章陆续的说了一些关于这些主题,但是讨论的都不够深入,今天我们深入的了解一下获取帮助信息.管道以及格式化输出的内容. 一.获取帮助信息 在PS中获取帮助信息,最常用的有: -? .get-comm ...
- 用eclipes 添加jboss tools中的hibernate tool进行反向工程生成数据库对应的BOJO(Javabean)
用eclipes 添加jboss tools中的hibernate tool进行反向工程生成数据库对应的BOJO(Javabean) 安装: 在help中eclise marksplace中查询JBo ...
- Django中Middleware中间件
Django中Middleware中间件 1 Middleware中间件概述 django中间middleware实质就是一个类,django会根据自己的规则在合适的时机执行中间件相应的方法.实际上当 ...
- 防止网页被别人的网站iframe,服务端如何设置HTTP头部中的X-Frame-Options信息?
一.现象:in a frame because it set 'X-Frame-Options' to 'deny'. 二.服务配置 因为,有时候为了防止网页被别人的网站iframe,我们可以通过在服 ...
随机推荐
- 前端通信:ajax设计方案(六)--- 全局配置、请求格式拓展和优化、请求二进制类型、浏览器错误搜集以及npm打包发布
距离上一次博客大概好多好多时间了,感觉再不搞点东西出来,感觉就废了的感觉.这段时间回老家学习驾照,修养,然后7月底来上海求职(面了4家,拿了3家office),然后入职同程旅游,项目赶进度等等一系列的 ...
- Maven <Profiles>定义不同环境的参数变量
记录一下 https://blog.csdn.net/qq245282209/article/details/52192115
- sql-原生jdbc连接7步
原生jdbc链接一般分为7步, 来获取链接并执行sql语句 1, 准备4大参数 static { url = "jdbc:mysql://localhost:3306/test" ...
- JavaScript 视频教程 收藏
001 JavaScript第1章 JavaScript概述 https://www.365yg.com/group/6410923214495940866/ 001 JavaScript第1章 Ja ...
- 经典SQL语句大全(转)
一.基础 1.说明:创建数据库CREATE DATABASE database-name 2.说明:删除数据库drop database dbname3.说明:备份sql server--- 创建 备 ...
- eclipse安装quick text search插件,全文搜索
主要有两种方法 1.InstaSearch 同样可以做到workspace下的全文搜索 可以使用eclipse marktplace中搜索instaSearch,与普通软件安装类似 安装成功后的界面如 ...
- 【Spring】3、BeanFactory 和 ApplicationContext的区别
转自:http://blog.csdn.net/intlgj/article/details/5660587 在spring中,两个最基本最重要的包是 org.springframework.bean ...
- JAVA通过XPath解析XML性能比较
转自[http://www.cnblogs.com/mouse-coder/p/3451243.html] 最近在做一个小项目,使用到XML文件解析技术,通过对该技术的了解和使用,总结了以下内容. 1 ...
- Java - TreeSet源码解析
Java提高篇(二八)------TreeSet 与HashSet是基于HashMap实现一样,TreeSet同样是基于TreeMap实现的.在<Java提高篇(二七)-----TreeMap& ...
- 数据定义语句(DDL语句)
建立表 create table 表名( 字段名1 类型, 字段名2 类型, ........ 字段名n 类型): 类型有: char(n) 是一个类型,叫定长字符串,数据不够就补空格 v ...