What's Changed
- Add support for Cloudflare proxy real IP headers to get client IP addresses when behind Cloudflare proxy
- Add support for custom trusted proxy headers to get client IP addresses when behind a trusted proxy other than Cloudflare proxy
- Add Remote-Role header to Badger passthrough headers
- Add throw a 401 redirect as necessary for the header auth to prompt the browser for a user and password
Full Changelog: v1.2.1...v1.3.0
Cloudflare Proxy Real IP Support
This release improves how Badger determines the real client IP when requests pass through proxies.
Badger 1.3.0 now automatically supports Cloudflare by trusting Cloudflare IP ranges and extracting the client IP from the CF-Connecting-IP header, ensuring accurate IPs for rate limiting, logging, geoblocking, and downstream services without extra configuration.
It also adds support for non-Cloudflare setups. You can now define custom trusted proxy IP ranges and specify a custom header to extract the client IP, making Badger usable behind any trusted load balancer or reverse proxy.
For more information about how this works read the README.
For how this works with Pangolin, read the Pangolin Docs.