My use case is: I have an asset at /foo.png that is often cached by Cloudflare. When it’s not cached, it goes to my origin server.
I would like to add a worker that handles the /foo.png route ONLY if Cloudflare doesn’t have the asset cached, and would otherwise be going to the origin server.
So far as I know, if I put a worker on the /foo.png route, it will ALWAYS handle the route, regardless of whether Cloudflare is caching it via page rules or not.
Is there any way (even something complicated involving forwarding) to make it so the worker will only run if the asset is not cached, and it would otherwise have to go to the origin server?