cloudflare firewall blocking legit api requests

hey guys im having a weird issue with my site
frontend is on domain.com and backend is on api.domain.com both running on same vps and both proxied through cloudflare
everything works fine until i turn on my custom firewall rule to block bad user agents
right after i enable it my frontend cant connect to the api anymore even when theres no ddos going on
i already added all cloudflare ipv4 ranges to my server firewall so only cloudflare can reach it
but the rule still blocks normal traffic somehow
any idea how i can keep the bad ua protection without breaking api requests
should i exclude api.domain.com from the rule or is there a better way
thanks in advance
Was this page helpful?