diff --git a/pkg/http/client.go b/pkg/http/client.go index e9cff53..47d9d3f 100644 --- a/pkg/http/client.go +++ b/pkg/http/client.go @@ -215,10 +215,9 @@ func (r *HTTPClient) replaceHostIfNeeded(req *http.Request) { return } // if hosts are found, ensure the host is an IPv6 host - host, port, err := net.SplitHostPort(req.URL.Host) + host, _, err := net.SplitHostPort(req.URL.Host) if err != nil { host = req.URL.Host // Use the host without port - port = "443" // Default HTTPS port } found := false for _, h := range r.ipv6Hosts {