Fixing security issue from get_client_ip

old `get_client_ip` may cause security issue, and IP could be faked.