Hey all!
Ran into this issue on my Blesta installation with 2 proxies sitting in front of my install. Essentially the proxy handling (check the "behind a proxy" flag in the settings) will store the forwarded IP, but it will store the whole string. This is problematic because this will often result in varchars that exceed the max size of the "ip_address" columns throughout the platform.
Many proxies (that I have used) will prepend the most confident result, resulting in a header that looks something like `127.0.0.1, 127.0.0.2, 127.0.0.3`, and the proxy believes `127.0.0.1` to be the true client IP. I handled this in my install like this:
`src/core/ServiceProviders/Requestor.php`
private function getIp($container)
{
...
$split = explode(",", $_SERVER['HTTP_X_FORWARDED_FOR']); // split header by ','
return ($forwarded && count($split) ? trim($split[0]) : $ip); // return the first element of split if possible
}