From 99b375cafa6f3f52776e93b6bf32a713ad40cefa Mon Sep 17 00:00:00 2001 From: Tnix Date: Fri, 16 Aug 2024 16:39:07 +1200 Subject: [PATCH] Update main.go --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index b6ffcd2..c6a136d 100644 --- a/main.go +++ b/main.go @@ -83,8 +83,10 @@ func main() { } if os.Getenv("MINIO_SECURE") != "1" { opts.Secure = false - opts.Transport = &http.Transport{ - TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + if os.Getenv("MINIO_NO_TLS_VERIFY") == "1" { + opts.Transport = &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } } } s3Clients[name], err = minio.New(endpoint, opts)