Accessing Worker URL from a Worker

Hi All,

Having a weird situation:

  1. Setup a subdomain “data ot example ot come” (CNAME pointing to some other domain - doesn’t matter i guess)
  2. Created a worker which returns some json data
  3. Created a route for the subdomain (“data ot example ot come / *”) and the worker mentioned above.
  4. Tested the worker using the WebUI, and Browser. It works, I can see the JSON output. Tried curl -v as well, everything works.


  1. Created another subdomain “consumer dot example ot come” (CNAME pointing to some other domain)

  2. Created a worker, which consumes the data ot example ot come URL to fetch the JSON Data
    let data_response = await fetch(new Request("data ot example ot come"))

  3. Worker works fine using the Web UI (Web based editor). Local “dev” server also works fine. no issue.

  4. Obviously created a route “consumer ot example ot come /*” and assigned the worker.

But when I open the “consumer” in my browser (or curl, wget, etc.), the worker gets executed, but when the code tries to access the “data ot example ot come” it completely bypasses the worker on "data ot example ot come " and directly fetches the page (from the CNAME domain), even after 24 hours the same result.

Am I missing something?


P.S.: Please ignore the odd domain names, I had to change all the links, as a new member, I can only post 2 links!!! Seriously!!!

Found my answer here: Issue With Worker-To-Worker HTTPS request - #33 by james50

Using the URL using http protocol works for me now.