Update functions.php for Caddy#1210
Conversation
This change gets the left most IP address from the X-Forward-For header. This is required to get the right IP easily from Caddy. Tested and working.
There was a problem hiding this comment.
Hello & Welcome! :)
Thanks for taking the time to help improve ITFlow. We're excited to review your contributions - we'll review this PR as soon as we can!
Whilst you're waiting, please feel free to check out the forum.
Just so you know, all contributions to ITFlow are licensed under the GNU GPL. By contributing you grant us a perpetual & irrevocable license to include your work in ITFlow.
|
|
@johnnyq what is the process for getting PRs included upstream? |
|
|
how will this affect users not using Caddy? |
|
If someone is using the Case 1 - Not using config value, not using caddy- No changes to use |
- Builds on PR #1210 to always get the leftmost IP address - Cloudflare (HTTP_CF_CONNECTING_IP) must now be explicitly defined, otherwise people could add the HTTP_CF_CONNECTING_IP header to a non-Cloudflare host and spoof IPs - Tidy up the if/else logic a little
|
@lilrags16 - Thanks for raising this, sorry it's taken so long to get some traction. |



This change gets the left most IP address from the X-Forward-For header. This is required to get the right IP easily from Caddy. Tested and working.