is there an "inside" api in CF Workers to route traffic to zerotrust tunnels?

i am building a simple worker to act as gateway to several zerotrust tunnels, which would be responsible for various things like ratelimit, loadbalancing and most importantly routing based on the request content, and that's why I cannot use CF Load Balancer directly. so, simply put: is there a method to redirect the request to the origin faster? or I have to use the URI like https://<team>.cfargotunnel.com anyway?
1 Reply
thousandmiles
thousandmilesOP3mo ago
thanks! great to hear. does this apply to tunnel URIs created in other cloudflare accounts as well? thanks, i looked closer into the documentation, now I understand... so I gotta use https://<tunnel_uuid>.cfargotunnel.com in the worker code. I just actually used this setup in my worker code, and failed to use this private endpoint url like https://<id>.cfargotunnel.com. when I fetch() uri from this domain, it got a HTML page saying DNS points to local or disallowed IPv6 address . After many unsuccessful attempts I changed it to the public hostname defined as a CNAME(which is of course configured in website DNS mapping to the private tunnel domain). How should I really use this private address? any extra setup?
Want results from more Discord servers?
Add your server