Limit access to flexible images via worker?

I want to only allow access to my images stored on cf images through my worker, but the issue is I want to use flexible variants to access them. My issue is that the only solution I can see to this is using signed delivery URLs, which disables flexible variants. Is it possible to block access to my imagedelivery.net url and customdomain.com/cdn-cgi/imagedelivery/ and only allow access via a worker?
1 Reply
Epailes
EpailesOP13mo ago
My primary concern is wanting to avoid letting users select their own image dimensions, which I can do in my own worker like: https://developers.cloudflare.com/images/image-resizing/control-origin-access/#avoid-image-dimensions-in-urls However I've previously used the imagedelivery.net url on my site, so I need to consider that leaked and can't hide those details anymore, so I'm looking for a way to limit access to eg a request that has an authorization header with an API key. I think this looks to not be possible, because I can't allow access to the raw image and need access to flexible variants looks like I'll need to use a different service for storage? That's a shame
Want results from more Discord servers?
Add your server