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