MCPcopy Index your code
hub / github.com/coder/coder / requestTunnel

Method requestTunnel

coderd/devtunnel/tunnel_test.go:278–283  ·  view source on GitHub ↗

requestTunnel performs the given request against the tunnel. The Host header will be set to the tunnel's hostname.

(tunnel *tunnelsdk.Tunnel, req *http.Request)

Source from the content-addressed store, hash-verified

276// requestTunnel performs the given request against the tunnel. The Host header
277// will be set to the tunnel's hostname.
278func (s *tunnelServer) requestTunnel(tunnel *tunnelsdk.Tunnel, req *http.Request) (*http.Response, error) {
279 req.URL.Scheme = "https"
280 req.URL.Host = tunnel.URL.Host
281 req.Host = tunnel.URL.Host
282 return s.client().Do(req)
283}

Callers 1

TestTunnelFunction · 0.80

Calls 2

clientMethod · 0.95
DoMethod · 0.65

Tested by

no test coverage detected