I have a web application that is proxied by Cloudflare running at
I am using the Cloudflare Worker Sites pattern to host a static site at
hybrid-app.example/static-content/. This worker is listening on the route
*staging-splendidspoon.com/static-content*. I can verify that this worker is configured correctly by navigating to
https://hybrid-app.example/static-content/hello.html, and seeing the correct content from my static site.
I also have a second Cloudflare worker that user the worker Router pattern to proxy select pages from the static site to vanity URLs on the same domain. In particular, this worker is configured to listen on the route
*hybrid-app.example/hello*. Internally, it does the following:
But when I navigate to
https://hybrid-app.example/hello, I see a
GET request to
/static-content/hello.html hit my origin server. So it appears that when I called
fetch function in a Cloudflare worker, it is resolving the request without checking for matches against any other worker routes. Is there an alternative to the Fetch API I can use to force a request from one cloudflare worker to check for other matching CF worker routes before resolving?