Skip to content

Commit

Permalink
fetcher: respect HTTP(S)_PROXY environment variable (#2635)
Browse files Browse the repository at this point in the history
  • Loading branch information
msanft authored Nov 23, 2023
1 parent d599b80 commit c922864
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/api/fetcher/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ import (

// NewHTTPClient returns a new http client.
func NewHTTPClient() HTTPClient {
return &http.Client{Transport: &http.Transport{DisableKeepAlives: true}} // DisableKeepAlives fixes concurrency issue see https://stackoverflow.com/a/75816347
return &http.Client{Transport: &http.Transport{
DisableKeepAlives: true, // DisableKeepAlives fixes concurrency issue see https://stackoverflow.com/a/75816347
Proxy: http.ProxyFromEnvironment,
}}
}

// Fetch fetches the given apiObject from the public Constellation CDN.
Expand Down

0 comments on commit c922864

Please sign in to comment.