Workers: Unable to fetch URLs with non-http port

I have a Cloudflare Worker that needs to send a POST to an external URL (not proxied by Cloudflare) with a custom port number. It works perfectly in the Quick Edit environment, but it looks like it’s totally blocked when running in production.

I read about the problem here: Workers can not fetch port 8080

But it was unclear what the underlying reason was, and which ports are opened for the Worker nodes.

That sounds like this thread from @thomas4. It’s old and points to a Workers bug, but I don’t know if it was resolved or not.

Not a bug unfortunately, workers always connect to port 443 if it’s https even if there is a valid cert on the custom port. Not sure if this will ever be resolved…

1 Like

And only Port 80 for HTTP, I suppose?

Any idea why it works in preview, but not production?

Not sure about http, it could work on any port.

Preview use node, not an isolate.

1 Like