fix: use skip-verify flag in ping
parent
d361afc289
commit
5ac45ccb8a
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue