How to avoid a proxy cloudflare worker for forwarding request to a subdirectory?

For Workes & Pages, what is the name of the domain?

apidev.example.com

What is the issue or error you’re encountering

Possible to avoid a proxy cloudflare worker

What steps have you taken to resolve the issue?

Create a cloudflare worker for handling feature1 at /feature1.
Found out CNAME only maps to domain or subdomain, not subdirectory

I have a cloudflare worker handles requests coming to /feature1/* (with a worker.dev subdomain),
is it possible to route requests directly to that worker, without creating a separate proxy worker at the subdomain level for forwarding to the worker at /feature1/*

Create a Worker Route with a value of example.com/feature1/*

1 Like