🐞 Fix worker https logic
Use https scheme for workers with TLS configuration set. Fixes #568. Signed-off-by: Major Hayden <major@redhat.com>
This commit is contained in:
parent
169f54ed34
commit
4f86db8ea4
1 changed files with 3 additions and 2 deletions
|
|
@ -39,10 +39,11 @@ func NewClient(address string, conf *tls.Config) *Client {
|
|||
}
|
||||
|
||||
var scheme string
|
||||
// Use https if the TLS configuration is present, otherwise use http.
|
||||
if conf != nil {
|
||||
scheme = "http"
|
||||
} else {
|
||||
scheme = "https"
|
||||
} else {
|
||||
scheme = "http"
|
||||
}
|
||||
|
||||
return &Client{client, scheme, address}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue