Skip to content
Discussion options

You must be logged in to vote

The important part here is deciding which proxy is trusted to provide the client IP information.

With Cloudflare in front of Traefik, you generally shouldn't simply trust arbitrary X-Forwarded-For values from the internet. The application or ingress should only trust forwarded client information when it came from a known trusted proxy.

Cloudflare provides CF-Connecting-IP for the original client address. Traefik can also work with forwarded headers when its trusted proxy configuration is restricted to the proxy IP ranges you actually trust.

So the general model is:

Client -> Cloudflare -> Traefik -> Application

Cloudflare is the trusted proxy, and Traefik is configured to trust forwarded …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@darkCry101-bot
Comment options

Answer selected by darkCry101-bot
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Search and Navigation Search, navigate, and understand code on GitHub Question Ask and answer questions about GitHub features and usage source:ui Discussions created via Community GitHub templates Other Features and Feedback Discussions that fall into "Other" category
3 participants