-
Notifications
You must be signed in to change notification settings - Fork 4
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
This plugin will no longer be needed in Caddy v2.7.0 #14
Comments
When will Caddy v2.7.0 be released? |
Caddy doesn't follow a release schedule. A release will be made when we have enough to release. |
thanks for the heads up. i have referenced this discussion on the main page for this repo. |
can i use this for 2.6.4? how to install this module? |
No @crapthings. You could build from the master branch though. It's not a plugin, it's changes in Caddy itself. |
Hello, where i must put trusted_proxies parameters please ? after in my PHP code i use : Thanks for your reply. |
In global options, at the top of your Caddyfile:
|
Thanks a lot for your Quick answer. |
If you're in Docker then you might be running into the problem where Docker is using a userland proxy which causes all TCP packets to appear that they're coming from Docker itself. That's not something you can fix with Caddy itself, it's a problem with Docker. See moby/moby#15086 |
Ok thanks again for your quick answer. I will investigate on docker. |
I'm using the new sintax but i don't know where I'm failing. I want to pass the IP present in the cloudflare header but it's not working as i thought. For example, with this config:
The application is not getting the header. If i change the trusted header to: Then it works. Why is not taking the IP from the CF header? Did I misunderstood something? |
If you want to automatically get the trusted proxies IPs for cloudflare, use this plugin https://github.com/WeidiDeng/caddy-cloudflare-ip instead of Also remove your |
The problem is that some applications does not properly read the header if it contains multiple IP address |
Then those should be fixed. They're not conformant to spec otherwise. Also you might need to use |
Just wanted to mention here that this plugin will no longer be needed because of the work done in caddyserver/caddy#5104.
The real client IP will be parsed if
trusted_proxies
is configured in global options, and the header it's read from can be configured withclient_ip_headers
(defaulting toX-Forwarded-For
). The logs will include it as a newclient_ip
field.Compared to this plugin, this approach doesn't affect
req.RemoteAddr
, that's left intact, but any other modules/handlers that might care to get the real client IP can get it from the request context.The text was updated successfully, but these errors were encountered: