fix: use skip-verify flag in ping

pull/18194/head
greg linton 2020-04-16 14:27:41 -06:00 committed by Greg
parent d361afc289
commit 5ac45ccb8a
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package main
import (
"crypto/tls"
"encoding/json"
"fmt"
"net/http"
@ -18,6 +19,9 @@ func cmdPing(f *globalFlags, opts genericCLIOpts) *cobra.Command {
c := http.Client{
Timeout: 5 * time.Second,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: flags.skipVerify},
},
}
url := flags.Host + "/health"
resp, err := c.Get(url)