Worker to Worker fetch

Hi there,

I would like to ask for some help with my cloudflare worker. When i make a request to another cloudflare worker of mine that holds a variable with data in it from another cloudflare worker. The data returned is empty, however i make the data request from my browser or api tester, it returns the correct data. It is specifcally when I request the data from a cloudflare worker.

import { Router } from 'itty-router'; const router = Router()

order_data = [];

//admin only
router.get("/order", async (req) => {
   return new Response(JSON.stringify(order_data));
});
Was this page helpful?