Only allow insecure if configured

This commit is contained in:
Dane Everitt 2020-04-12 17:05:13 -07:00
parent 70a647097e
commit 5c4064f87a
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -45,8 +45,10 @@ func init() {
}
func configureCmdRun(cmd *cobra.Command, args []string) {
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{
InsecureSkipVerify: true,
if configureArgs.AllowInsecure {
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{
InsecureSkipVerify: true,
}
}
if _, err := os.Stat("config.yml"); err == nil && !configureArgs.Override {