diff --git a/config/http_config.go b/config/http_config.go index 4a926e8d..43209cb6 100644 --- a/config/http_config.go +++ b/config/http_config.go @@ -388,6 +388,10 @@ func (c *HTTPClientConfig) Validate() error { return fmt.Errorf("at most one of oauth2 client_secret & client_secret_file must be configured") } } + // Change empty URL to nil to avoid connection errors + if c.ProxyURL.URL != nil && *c.ProxyURL.URL == (url.URL{}) { + c.ProxyURL.URL = nil + } if err := c.ProxyConfig.Validate(); err != nil { return err }