Worker subrequest to self throwing 403 error

Hello! My previous post was blocked by the spam filter since I’m a new user so I’m trying again:

I’m building an SSR utility for Cloudflare workers. When rendering the page in a worker, it might need to make subrequests to itself to get the initial state. For example, while rendering /home route, it will request /api/state/home or something similar in order to get the initial state for this route.

However, this subrequest is throwing 403 errors. Is it not possible to make a subrequest to the same worker?
I’ve also tried to split the /api/ in a different worker but it still throws 403 (perhaps because they are still in the same account?).

I can think of a workaround for my use case but allowing requests to the same worker would simplify things a lot.

Thank you.

So far not possible.

1 Like