Skip to content

Commit

Permalink
Backport proxyURL fix
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierCazade committed Jan 22, 2024
1 parent 7e44242 commit 0cf5540
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/http_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 0cf5540

Please sign in to comment.