I'm currently using LogDNA for tracking Nginx logs. Meanwhile, my Nginx server is behind Cloudflare proxy, I can only see IPs of Cloudflare by default in LogDNA. Let's see how to reveal user's real IP address in the logs behind such reverse proxy server by using ngx_http_realip_module.
If your HTTP server is running behind Cloudflare, it is recommended to only allow traffic from Cloudflare IP addresses. We can config this systematically using iptables. However, it's also flexible to white list Cloudflare IPs just inside the Nginx service.
Although Netlify provides CDN service, Cloudflare has more edge locations around the world. What's more, Netlify hosted sites are hardly reached in China, while Cloudflare still lives. With this in mind, I decided to switch to Cloudflare for load balancing. However, pushing post/file changes to Netlify did not clear Cloudflare's cache, that's a mess. So, I'm going to use Cloudflare's API together with Netlify's outgoing webhook to make them in the same pace.