How to get asset from a Cloudflare DDOS protected url?

Viewed 375

I want to get the audio as bytes with Dio http client, so I can play audio from a local file. I was using audioplayers plugin and it was working fine just by giving it a url until we add cloudflare. Now that 5 seconds DDOS protection throws 503 status code.

I wonder if there's a workaround to get this data from a link protected with Cloudflare.

sample image url sample audio url

1 Answers

From Cloudflare official website, using Cloudflare with your API:

Security Level: Not IUAM The Security level controls Cloudflare's basic protection level for the URL pattern. When this feature is set to "I'm Under Attack" either in the Cloudflare settings or in a page rule, each visitor is presented with an interstitial page with a 5 second delay before the request is redirected to its destination.

We advise specifying this to anything but "I'm Under Attack" so that there is never a delay applied to API requests.

So you should remove the feature "I'm Under Attack"

Related