1. Hide back-end server versions
In our daily work we use haproxy as a load balancer, because the backend application server is more cumbersome to change, so it is decided to implement it in the load balancer.
Only need to frondend or listen or backend, add
Rspidel ^server:.* rspidel ^x-forwarded-for:.* rspidel ^x-powered-by:.* rspidel ^via:.* rspide L ^x-aspnet-version:*
The above use can refer to Rspidel.
In addition, if you need to confuse some people to add response headers as needed, you can use Rspadd.
Rspadd server:\ Aws
2.Haproxy Add compression function (for Haproxy 1.5 or later, not supported in 1.4 and below)
Add in Global
Tune.comp.maxlevel 9 #压缩级别 maxcompcpuusage #压缩最大可使用CPU资源为50%
Add in Defaults
Compression Algo gzip #压缩算法 compression type text/html text/plain application/x-javascript text/css application/ XML #压缩文件类型 Compression Offload #使用本地压缩方式
This article is from "Maple Night" blog, please be sure to keep this source http://fengwan.blog.51cto.com/508652/1692175
Haproxy Hidden backend server information and Haproxy implementation compression