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{}
|
requester := &http.Client{}
|
||||||
|
transport := http.DefaultTransport.(*http.Transport).Clone()
|
||||||
if conf != nil {
|
if conf != nil {
|
||||||
requester.Transport = &http.Transport{
|
transport.TLSClientConfig = conf
|
||||||
TLSClientConfig: conf,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
requester.Transport = transport
|
||||||
|
|
||||||
return &Client{server, requester, offlineToken, oAuthURL, nil, nil, &sync.Mutex{}}, nil
|
return &Client{server, requester, offlineToken, oAuthURL, nil, nil, &sync.Mutex{}}, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue