SlowShip
Chevereto Member
Hello,
After having looked into the source code closely. I think the script ignore Cloudflare settings, and if it sees HTTP_CF_CONNECTING_IP, it will automatically equal REMOTE_ADDR and ignore the X-REAL-IP or X-FORWARDED-FOR header from the load balancer (in my particular case, I append both header from nginx)
Reproducible step:
0. Of course, having a working chevereto up and running.
1. Setup a nginx reverse proxy (or load balance).
2. Make sure the reverse proxy return the true IP of the client while connecting through it (a small php that return REMOTE_ADDR will confirm this)
3. Put everything behind Cloudflare (or enable Cloudflare)
4. Upload something, the app will return the reverse proxy /loadbalance IP instead of the true REMOTE_ADDR
Can you re-write the script so that it will be return value like X-REAL-IP or X-FORWARDED-FOR (if exist) and not just HTTP_CF_CONNECTING_IP ?
Even better yet, have a setting so that we can disable this behavior as a proper webserver config wouldn't need chevereto to intervene like this and will just return REMOTE_ADDR
After having looked into the source code closely. I think the script ignore Cloudflare settings, and if it sees HTTP_CF_CONNECTING_IP, it will automatically equal REMOTE_ADDR and ignore the X-REAL-IP or X-FORWARDED-FOR header from the load balancer (in my particular case, I append both header from nginx)
Reproducible step:
0. Of course, having a working chevereto up and running.
1. Setup a nginx reverse proxy (or load balance).
2. Make sure the reverse proxy return the true IP of the client while connecting through it (a small php that return REMOTE_ADDR will confirm this)
3. Put everything behind Cloudflare (or enable Cloudflare)
4. Upload something, the app will return the reverse proxy /loadbalance IP instead of the true REMOTE_ADDR
Can you re-write the script so that it will be return value like X-REAL-IP or X-FORWARDED-FOR (if exist) and not just HTTP_CF_CONNECTING_IP ?
Even better yet, have a setting so that we can disable this behavior as a proper webserver config wouldn't need chevereto to intervene like this and will just return REMOTE_ADDR