Worker using fetch gets 522 from CF Pages Project

Here is my problem. User hits my pages website (origin), the javascript that is loaded hits the pages endpoint /api/data. /api/data internally is bound to a worker so the request is passed through to said worker. That worker runs some business logic then uses await fetch(origin/some-specific-path).

That fetch request is returning a 522 from the CF pages project.

Running this all locally works fine with the service binding via wrangler.

How do I resolve this?
Was this page helpful?