From 353044aafd6800f4c2c52b248f02b02c3a3bef53 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Mon, 3 Jul 2023 15:33:50 +0200 Subject: [PATCH] feat(proxy): honor the proxy environment variables (#952) Co-authored-by: Gabriele Gerbino --- utils/types.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/types.go b/utils/types.go index a4d377df1..04b8f0669 100644 --- a/utils/types.go +++ b/utils/types.go @@ -292,6 +292,7 @@ func GetKonnectClient(httpClient *http.Client, config KonnectConfig) (*konnect.C if httpClient == nil { defaultTransport := http.DefaultTransport.(*http.Transport) + defaultTransport.Proxy = http.ProxyFromEnvironment httpClient = http.DefaultClient httpClient.Transport = defaultTransport } @@ -329,6 +330,7 @@ func HTTPClient() *http.Client { Timeout: clientTimeout, }).DialContext, TLSHandshakeTimeout: clientTimeout, + Proxy: http.ProxyFromEnvironment, }, } }