I’m trying to connect to a service not on a standard port (443, 8443), I thought it would be doable in Workers. I connect to the standard 443 port, intercept the request, change the origin port to whatever I want and then reply. It doesn’t seem to work though.
At the moment I’m trying with this code, but it gives a Compute Error.
var newURL = new URL(request.url) newURL.port = '***' return fetch(newURL, request)
I tried also verifying if the ports were open outbound from the Worker and they are. There is no apparent error given, the origin has a valid, albeit not on the exact hostname SSL certificate, which is solved by a SSL Full Page Rule.
Any ideas? A bug in the Worker, in my code or it’s not doable @KentonVarda?