Cloudflare Worker Reverse Proxy Not Working

I have a worker i’ve deployed to enable a reverse proxy under my subdomain.

I have the route for it setup as

The code for the worker is–

addEventListener("fetch", event => {

async function handleRequest(request) {
  var url = new URL(request.url)

  url.hostname = ""
  return await fetch(url, request)

In the worker quick edit, i’ve validated that this works.

However, when i make requests to, it never routes the traffic to the worker.

1 Like

From the example you’ve given, you have it mapped to only sub domains but you are not requesting a sub domain. Which is exactly why it wouldn’t be called.

If you need further help, please share your domain and the exact mapping you’re doing.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.