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
aaaaaaaaaaaaaaaaa
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?
daniel_klungo
daniel_klungoOP2y ago
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 work
Erisa
Erisa2y ago
Rules 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
daniel_klungo
daniel_klungoOP2y ago
thanks for the reply, good to know this is a supported case!
Erisa
Erisa2y ago
Yeah youll be fine, it should be documented if not for me being unable to find the time 😅
daniel_klungo
daniel_klungoOP2y ago
so much docs, so little time 🕰️
joelsz
joelsz2y ago
You can also use a WAF rule for that matter, as it applies to any path
Want results from more Discord servers?
Add your server