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.