trev/rubyflare

The API calls fail with "You are blocked" message b/o a new policy of Cloudflare

vovayartsev opened this issue · 0 comments

I created a support request within CloudFlare and here's the reply and the fix proposed:

We recently saw a surge in resource-intensive traffic from client API calls that did not contain a User-Agent. As a short term measure we've added some validation to ensure clients supply a User-Agent request header with a value.

In your API call, if you add a User-Agent string your calls should work correctly. If you are using something like cURL, you would achieve this via the --header option:

--header "User-Agent: MyAPIClient/1.01"

You would want to replace "MyAPIClient" with something that identifies your API integration and "1.01" with a version identifier, but this is not strictly necessary as long as the User-Agent header has a value.