From bfd61ca51169f2ad694fd082ee1c1ab070dde16f Mon Sep 17 00:00:00 2001 From: Owen Date: Wed, 22 Apr 2026 21:36:16 -0700 Subject: [PATCH] Fix transport issue --- netstack2/http_handler.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netstack2/http_handler.go b/netstack2/http_handler.go index 9d5efd8..df4e686 100644 --- a/netstack2/http_handler.go +++ b/netstack2/http_handler.go @@ -276,10 +276,10 @@ func (h *HTTPHandler) getProxy(target HTTPTarget) *httputil.ReverseProxy { Scheme: scheme, Host: fmt.Sprintf("%s:%d", target.DestAddr, target.DestPort), } - insecureTransport := (*http.Transport)(nil) + var transport http.RoundTripper = http.DefaultTransport if target.Scheme == "https" { // Allow self-signed certificates on downstream HTTPS targets. - insecureTransport = &http.Transport{ + transport = &http.Transport{ TLSClientConfig: &tls.Config{ InsecureSkipVerify: true, //nolint:gosec // downstream self-signed certs are a supported configuration }, @@ -296,7 +296,7 @@ func (h *HTTPHandler) getProxy(target HTTPTarget) *httputil.ReverseProxy { // X-Forwarded-For entry, so the header is set exactly once. pr.SetXForwarded() }, - Transport: insecureTransport, + Transport: transport, } proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) {