I’m experiencing a weird bug related to caching with Cloudflare. I am serving static files through Nginx at the route https://example.com/static/*. This serving works as intended, even with Cloudflare caching enabled. However, for one specific file, https://example.com/static/js/subscriptions.js, I am continuously getting 521 errors. The entirety of my site is accessible to Cloudflare, EXCEPT for that singular route.
When you say “continuously”, is that 100% of the time? I see you’ve done a lot of troubleshooting. What kind of allowlist is that on your server? The firewall? Is there anything in your NGINX logs? Do you have access to firewall logs?
I am running fail2ban on my server, and I am using Cloudflare-apiv4 and my local iptables to ban clients. I have configured fail2ban to ignore all of the Cloudflare IP’s listed at IP Ranges, so I don’t think fail2ban is the problem. My Nginx logs aren’t showing trying to access subscriptions.js, either. Fail2ban logs aren’t showing anything being found/banned.
I’ve opened a ticket and I’ll see what support has to say. Thank you.