Worker over existing site possible?

I have a (non-static) website deployed to

I proxy to it via CF (A record for pointing to render ip, CNAME for to render domain).

I want a worker that runs for just a*

I tried the obvious way to configure it in wrangler.toml:

route = { pattern = "*, zone_id = “my-zone-id” }

But the worker is not executed. It is executed on domain so it’s there.

The route shows up in /workers tab in dashboard.

The way I read Routes · Cloudflare Workers docs it should just work, but it doesn’t.

Is such a setup supported?

If yes, what have I missed in my config? How can I debug this?

That looks fine, can you share your code and config?

Thanks for response.

Here’s my complete setup: is hosted on render, proxied via CF.

My wrangler.toml:

name = "upload-s3"
main = "src/index.js"
compatibility_date = "2023-01-21"
workers_dev = true

# route = { pattern = "*", zone_name = "" }

route = { pattern = "*", zone_id = "f227b44842e4b35fb1b4607ceb7838ba" }

This is straight from Configuration · Cloudflare Workers docs

I tried both zone_name and zone_id.
I tried with both workers_dev = true and false.
I tried with route*

My worker at the moment is the simplest thing possible:

export default {
	async fetch(request, env, ctx) {
		return new Response("Hello World!");

Given those I would expect going to would trigger the worker and displlay Hello world in the browser.

But the worker just doesn’t seem to be invoked.

The route shows in the ui:

The worker works on cf domain:

Worker seems to be configured properly:

This is all the most basic setup, following the docs.

It works when I setup worker on a custom domain.

So my theory is that in this DNS setup somehow causes the worker to not trigger the worker but there’s nothing in the docs suggesting such limitations.