Skip to content

Support custom headers in Traefik Logs, e.g. Cloudflare's cf-connecting-ip #1845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nktnet1 opened this issue May 7, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@nktnet1
Copy link
Contributor

nktnet1 commented May 7, 2025

What problem will this feature address?

When using cloudflare domains with proxy turned on, the client's IP is passed in the header with the key CF-Connecting-IP

We have been receiving many 404s to paths that do not exist in our applications.
Currently, the Traefik request logs only shows the IP of the client, which would be Cloudflare.

Describe the solution you'd like

It would be helpful if we can also extract custom values from the header to include in the logs.
That way, we can include the CF-Connecting-IP.

Describe alternatives you've considered

Printing out the IP at the application level

Additional context

No response

Will you send a PR to implement it?

No

@nktnet1 nktnet1 added the enhancement New feature or request label May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant