The docs are a little confusing on the Static Assets Workers, maybe I'm misreading them but they see
The docs are a little confusing on the Static Assets Workers, maybe I'm misreading them but they seem to contract themselves.
If you read https://developers.cloudflare.com/workers/static-assets/routing/ it says:
I tested it, and if a static asset is matched, it's returned, else my Worker's fetch is invoked. Makes sense. Then I got confused by the binding example on https://developers.cloudflare.com/workers/static-assets/binding/:
But I don't think that's true / the final return won't ever be hit if a static asset is found, it would just never call the worker (e.g. you have public/blog.html, and
If you read https://developers.cloudflare.com/workers/static-assets/routing/ it says:
I tested it, and if a static asset is matched, it's returned, else my Worker's fetch is invoked. Makes sense. Then I got confused by the binding example on https://developers.cloudflare.com/workers/static-assets/binding/:
But I don't think that's true / the final return won't ever be hit if a static asset is found, it would just never call the worker (e.g. you have public/blog.html, and
/blog is hit, it will just return the static asset and not call the worker). Am I missing something? It feels like the final "return" should really be a 404? Which I think technically it would return anyway but to me at least it's a bit misleaading as for assets that exist, it'd never hit the worker anyway

