From 5c4064f87a9d607a22f3f53484160dfd14c96fdd Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 12 Apr 2020 17:05:13 -0700 Subject: [PATCH] Only allow insecure if configured --- cmd/configure.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/configure.go b/cmd/configure.go index 0eae650..d08afcf 100644 --- a/cmd/configure.go +++ b/cmd/configure.go @@ -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 {