worker: use default transport instead of "blank" one
This allows us to use the default behaviour of http.DefaultTransport to honor HTTP_PROXY. Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
f0f80bd930
commit
17e809b5f7
1 changed files with 3 additions and 3 deletions
|
|
@ -72,11 +72,11 @@ func NewClient(baseURL string, conf *tls.Config, offlineToken, oAuthURL *string,
|
|||
}
|
||||
|
||||
requester := &http.Client{}
|
||||
transport := http.DefaultTransport.(*http.Transport).Clone()
|
||||
if conf != nil {
|
||||
requester.Transport = &http.Transport{
|
||||
TLSClientConfig: conf,
|
||||
}
|
||||
transport.TLSClientConfig = conf
|
||||
}
|
||||
requester.Transport = transport
|
||||
|
||||
return &Client{server, requester, offlineToken, oAuthURL, nil, nil, &sync.Mutex{}}, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue