Skip to content

Commit 33346b0

Browse files
committed
Added check for empty ProxyURL
1 parent c5e1b60 commit 33346b0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config/http_config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,10 @@ func (c *HTTPClientConfig) Validate() error {
334334
return fmt.Errorf("at most one of oauth2 client_secret & client_secret_file must be configured")
335335
}
336336
}
337+
// Change empty URL to nil to avoid connection errors
338+
if c.ProxyURL.URL != nil && *c.ProxyURL.URL == (url.URL{}) {
339+
c.ProxyURL.URL = nil
340+
}
337341
return nil
338342
}
339343

0 commit comments

Comments
 (0)