Is there a way to disable the `/cdn-cgi/image/` route?
I want to have Image Resizing enabled solely via a CF Worker, and not have it available on the cdn-cgi route
7 Replies
Have you thought about a Redirect Rule. You could detect the hostname as example.com and then redirect cdn-cgi/images/ to the Worker? Would that work?
Hmm, my main goal here is to completely disable the
cdn-cgi/images/
route, but I can't seem to get that working with the Rules
seems like a redirect rule does the trick! not sure why neither a Page Rule nor a Configuration Rule that disabled all apps on the URL didn't workRules dont apply to /cdn-cgi paths except for some very rare exceptions
redirect rule on images is one of those exceptions
this is actually something ive been meaning to add to the docs
thanks for the reply, good to know this is a supported case!
Yeah youll be fine, it should be documented if not for me being unable to find the time 😅
so much docs, so little time 🕰️
You can also use a WAF rule for that matter, as it applies to any path