🐞 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:
Major Hayden 2020-04-29 13:29:09 -05:00 committed by Ondřej Budai
parent 169f54ed34
commit 4f86db8ea4

View file

@ -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}