Fetch works locally, goes 522 when deployed

I would reaally appreciate some help when it comes to fetching an external API from inside of a Cloudflare Worker.

My API is running with Express at the url https:/[redacted].hstgr.cloud:3000/ and when I do fetch that locally, I get a proper response which is a JSON with a "message: Request Accepted!" - you see that in the browser.

So this works everywhere except inside a Worker:

const response = await fetch(
'https://[redacted].hstgr.cloud:3000/'
)

Inside a worker, it goes 522 and I can't get any info on it.

I tried messing up with nginx configs, disabled ufw, disabled Hostinger's Firewall, and also whitelisted Cloudflare IPs in my VPS machine.

Anything else I should look for?
Was this page helpful?