Worker request to self

Hello! I’m making a server-side rendering prototype for Cloudflare workers (https://github.com/frandiox/vite-ssr) and I’ve found an issue I’m not sure how to fix.

Basically, I’m rendering HTML for a given route (e.g. /home) and calling /api/getProps?path=home from the same worker in order to get some initial state for the page component.

This request seems to be working fine when using Node but it fails with 403 forbidden error in a worker.
Is there any way to make a self request to the same worker?

Everything else seems working fine. You can see in https://vite-ssr.zable.workers.dev/ that server props only fail during the first rendering (ssr) but work well after navigating to other pages (when the request to /api/getProps is done from the frontend instead of the worker itself)

Apart from that, seems that event.request.url doesn’t match the URL given by wrangler dev but I guess this is on purpose.

Any ideas? Thank you.