Skip to content

Commit

Permalink
Added check for empty ProxyURL
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierCazade committed Jul 20, 2022
1 parent c5e1b60 commit 33346b0
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 @@ -334,6 +334,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
}
return nil
}

Expand Down

0 comments on commit 33346b0

Please sign in to comment.