Probably been discussed a lot but any

Probably been discussed a lot, but any chance worker subrequests can reach other ports than 80/443? The use case is connecting to an external ClickHouse or ElasticSearch database, typically hosted on port 8123 or 9200, without having to have an intermediary router. Tx
They can't unfortunately
Sorry, for digging something up from a couple months ago, but I just stumbled upon this and it seems to blow up my plans for using CF Workers... I want to use Workers as a sort of API gateway, to send off requests to various other places, services etc... and then return the results (manipulated by HTMLRewriter etc...) to the client browser. Some of the requests will be to things like Google Translate (443), but I'll be using Elasticsearch as well as some other microservices using FastAPI. Are you saying that it isn't possible to target a specific port (e.g. 9200) at an IP address/url?
2 Replies
nickchomey
nickchomey2y ago
Nevermind. There's plenty of other discussions in this and other channels that confirm it only works on 80/443. However, it is suggested to use Cloudflare Tunnels to avoid the need for ports altogether. I'll have to explore that.
nickchomey
nickchomey2y ago
Actually, this forum post does suggest that non-standard ports are possible, but only if the domain is in the same zone as the worker. https://community.cloudflare.com/t/worker-fetch-causes-521-error-over-https-on-port-9200/443941 More details here: https://developers.cloudflare.com/dns/zone-setups/full-setup/setup/ I'll have to explore some more. Unless anyone knows more?
Cloudflare Community
Worker fetch causes 521 error over HTTPS on port 9200
I am attempting to connect to an external web service that is running over a non-starndard port (9200), it uses https and can be called from any web request (wget, curl, python, Azure Functions, Powershell, and postman all were tested) so we know its operational. However, the Cloudflare worker is the only system that can’t seem to access this a...
Change your nameservers (Full setup) · Cloudflare DNS docs
If you want to use Cloudflare as your primary DNS provider and manage your DNS records on Cloudflare, your domain should be using a full setup.
Want results from more Discord servers?
Add your server