From 33346b0ad00fef901ea9f1ae039f834ff239abad Mon Sep 17 00:00:00 2001 From: Olivier Cazade Date: Wed, 20 Jul 2022 15:13:08 +0200 Subject: [PATCH] Added check for empty ProxyURL --- config/http_config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/http_config.go b/config/http_config.go index bcda953a..23ac0234 100644 --- a/config/http_config.go +++ b/config/http_config.go @@ -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 }