扫描工具提醒有host header attack漏洞,跟下图漏洞是同一个漏洞,不同扫描工具漏洞描述不一致。

host header attack解决方案

解决方法:

在web项目的过滤器中过滤host,如下图所示:

host header attack解决方案

注意:“localhost:8089”这个参数可以写入配置文件,然后从配置文件中读出来,亲测这种方式有效,已在正式环境中使用!!!

改进后(可配置多个ip):

host header attack解决方案

相关文章: