We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7638c7 commit 72c9655Copy full SHA for 72c9655
httpclient/httpclient_config.go
@@ -37,7 +37,11 @@ func DefaultConfig() (*Config, error) {
37
var err error
38
if viper.IsSet("network.proxy") {
39
proxyConfig := viper.GetString("network.proxy")
40
- if proxy, err = url.Parse(proxyConfig); err != nil {
+ if proxyConfig == "" {
41
+ // empty configuration
42
+ // this workaround must be here until viper can UnSet properties:
43
+ // https://github.com/spf13/viper/pull/519
44
+ } else if proxy, err = url.Parse(proxyConfig); err != nil {
45
return nil, errors.New("Invalid network.proxy '" + proxyConfig + "': " + err.Error())
46
}
47
0 commit comments