Skip to content

Commit

Permalink
Backport proxyURL fix
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierCazade committed Mar 5, 2024
1 parent bd41eb6 commit 65c3989
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 @@ -385,6 +385,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 65c3989

Please sign in to comment.