Cloduflare-Nginx-UpdateIPs collects all of CloudFlare's IPs and formats them so that nginx understands them and can restore the original visitor's ip. You should run this script periodically so that nginx is up-to-date with CloudFlare's IPs and your server logs won't miss the real visitor's IP address.
How to use it
docker run --rm matt3o12/cloudflare-nginx-updateips > nginx_config_path/conf.d/cloudflare.conf
nginx_config_path with nginx's config path.
Nginx should restore the visitor's ip after loading it.