-
Notifications
You must be signed in to change notification settings - Fork 43
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
wrong client ip when using with cloudflared #150
Comments
It wold be better if we have an option to pass |
Hi, the related code is https://github.com/corazawaf/coraza-caddy/blob/main/http.go#L24-L33, we are currently using
Will have to explore how to extract the Related issue: https://caddy.community/t/getting-real-ip-with-caddy-behind-a-reverse-proxy/24518 |
That's my post on caddy community |
Hey @samdelong, thanks for chiming in. I see that your solution is based on |
I didn't have to add anything to my Caddyfile config. I dont have any PRs to reference, but since that post was from 3 years ago its seems the |
I am running caddy and cloudflared in containers. I expose the app through cloudflare tunnel. Even though I see correct IP address for the user in the client_ip field in caddy HTTP access logs, I only see my local IP where my cloudflared container is running in "client" field in coraza's logs.
In caddy logs, remote_ip field refers to 172.19.0.2 (my local cloudflared)
As far as I remember caddy recommends to use "client_ip" field rather than "remote_ip" for the addons. that might be the case.
The text was updated successfully, but these errors were encountered: