Query regarding API

Hope you are doing great!

Can I block access to my Cloudflare API for the specific site directory, followed by wildcard?

Is it possible? If so, it would be really great.

Thanks & Regards,

Can you give a little more information on what you are trying to achieve?

I use Cache Everything page rule with my WordPress. It has come to my notice that an unofficial plugin which I am using to purge cache is doing something unfair by aggressive purging. Resultantly, I am seeing lots of MISS response by Cloudflare. This is not a fault of CF.

But, it’s a plugin which doing unfair by purging whole cache even when I make little changes to my site.

This is why - I want to LIMIT my API usage in a way, so that plugin can never purge directory such as /wp-content/, /wp-includes/ or as per file format. Anyway, I would like to prevent purging of some files using API.

Because aggressive purging is doing more bad, even while using Cache Everything module.

Unfortunately not. The API key allows you/your script to take any action which is allowed on your plan level. There’s no way to restrict it today to even a DNS only type task today for example. If the plug-in can’t be modified I’d suggest either scripting it yourself using the API or just doing individual file purges via the API for the content you want to flush from our cache.

I haven’t played with too many of the plug-ins for WP, so not sure if there is a better plugin you might use. Perhaps someone else can chime in on that.


The expected thing I want to purge only dynamic page, and never want to purge static files. I am not sure when Plugin author will act on this to resolve the issue. So, myself I am trying to find out a solution.

Thanks & Regards,

Yes, the last option is coding myself. Thanks for giving me hope.