The function get_ip doesn't check if the request is being forwarded. A request will get forwarded on site that are using a CDN like CloudFlare