Traefik plugin to retrieve client IPs. Supports retrieving the IP from and writing the result to arbitrary headers.
If a list or a count of trusted proxies is specified, the header is parsed with the same format as the X-Forwarded-For
header (1.2.3.4, 1.2.3.5, ...
). Otherwise, the entire header is parsed as an IP.
The first valid IP retrieved is written to the configured destination headers.
experimental:
plugins:
realip:
moduleName: github.com/Desuuuu/traefik-real-ip-plugin
version: v1.0.1
http:
middlewares:
realip:
plugin:
realip:
retrievers:
- header: X-Forwarded-For
proxyCIDRs:
- "203.0.113.195/24"
headers:
- X-Real-IP
http:
middlewares:
realip:
plugin:
realip:
retrievers:
- header: X-Forwarded-For
proxyCount: 1
headers:
- X-Real-IP