通过HAProxy传递的请求标头,但是hdr(),req.hdr()或任何相关函数虽然将请求标头传递到目标服务器,但无法识别任何请求标头。
hdr()
req.hdr()
我的前端配置如下,使用http模式:
acl xip req.hdr(x-real-ip) -m found use_backend first-half if xip
不起作用!尽管存在此标头。
NB:仅检测到req(host)。
req(host)
您需要使用“ X-Forwarded-For”代替“ x-real-ip”。