Add support for PROXY and PORT envs
This commit is contained in:
@@ -72,8 +72,9 @@ func NewHTTPClient(
|
||||
}
|
||||
|
||||
var dialer proxy.Dialer = &net.Dialer{
|
||||
Timeout: time.Duration(timeoutSecs) * time.Second, // timeout to establish connection
|
||||
Timeout: time.Duration(timeoutSecs) * time.Second, // timeout for dns resolution, tcp handshake
|
||||
}
|
||||
|
||||
if proxyURLString := cfg.GetProxy(); proxyURLString != "" {
|
||||
proxyURL, err := url.Parse(proxyURLString)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user