GitHub issue crowdsec_manager #137, opened by
iconoclastheroon GitHub
For a given Traefik log entry, e.g.:
{
"ClientAddr": "104.22.105.6:10884",
"ClientHost": "104.22.105.6",
"DownstreamContentSize": 0,
"DownstreamStatus": 0,
"Duration": 173108453463,
"OriginContentSize": 0,
"OriginDuration": 171130088445,
"OriginStatus": 0,
"Overhead": 1978365018,
"RequestMethod": "GET",
⋮
"level": "info",
"msg": "",
"origin_Content-Type": "",
"request_Cf-Connecting-Ip": "2607:fb90:6272:c2f0:d4c6:76ff:fed1:bb7b",
"request_Cf-Ipcountry": "US",
"request_Cookie": "REDACTED",
"request_User-Agent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Mobile Safari/537.36",
"request_X-Forwarded-For": "2607:fb90:6272:c2f0:d4c6:76ff:fed1:bb7b",
"request_X-Forwarded-Host": [REDACTED],
"request_X-Forwarded-Proto": "https",
"request_X-Real-Ip": "2607:fb90:6272:c2f0:d4c6:76ff:fed1:bb7b",
"time": "2026-09-18T09:57:46-04:00"
}
When request_Cf-Connecting-Ip is available, it would be useful to optionally use that as the IP for hit/source tallying instead of ClientAddr / ClientHost.
In this example, ClientHost is the Cloudflare proxy (104.22.105.6), while request_Cf-Connecting-Ip contains the actual client IP. For purposes such as counting hits by source IP, using ClientHost would therefore aggregate all Cloudflare traffic together rather than representing the actual visitors.
More generally, though, it would probably be ideal if the **“end-user IP header field” …
Discuss it here. Status, fixes and code review stay on GitHub.