MPOS/php-mpos — pull request #2002 by Contex (2014-03-24 19:02:09+00:00)
Title: Cloudflare IP forwarding when using getCurrentIP()

HTTP_X_FORWARDED_FOR doesn't always work with Cloudflare, HTTP_CF_CONNECTING_IP however does.

https://support.cloudflare.com/hc/en-us/articles/200170986-How-does-CloudFlare-handle-HTTP-Request-headers-

Also, made it check if variables a true/false before running filter_var.