I’ve read a lot of posts and docs about this… I’m still unable to get the CF-Connecting-IP in my haproxy access logs.
# Cloudflare origin IP
acl from_cf src -f /etc/haproxy/cf-ips/CF_ips.lst
acl cf_ip_hdr req.hdr(CF-Connecting-IP) -m found
http-request set-header X-Forwarded-For %[req.hdr(CF-Connecting-IP)] if from_cf cf_ip_hdr
I am using the above on the frontend to get the CF-Connecting-IP - but my haproxy access logs still show all CF IPs instead of origin IPs. Is that expected?
Thanks in advance!
2 posts - 2 participants