Skip to content

Commit

Permalink
feat(proxy): honor the proxy environment variables (#952)
Browse files Browse the repository at this point in the history
Co-authored-by: Gabriele Gerbino <gabrielegerbino@gmail.com>
  • Loading branch information
Tieske and GGabriele committed Jul 3, 2023
1 parent 43ac0a8 commit 3555a9a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utils/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -329,6 +330,7 @@ func HTTPClient() *http.Client {
Timeout: clientTimeout,
}).DialContext,
TLSHandshakeTimeout: clientTimeout,
Proxy: http.ProxyFromEnvironment,
},
}
}

0 comments on commit 3555a9a

Please sign in to comment.