add insecure option, update docs

This commit is contained in:
Frederik Ring
2021-08-22 19:26:34 +02:00
parent 34e01fa303
commit 8161ad7f8f
4 changed files with 36 additions and 16 deletions

View File

@@ -106,7 +106,7 @@ func (s *script) init() error {
os.Getenv("AWS_SECRET_ACCESS_KEY"),
"",
),
Secure: os.Getenv("AWS_ENDPOINT_PROTO") == "https",
Secure: os.Getenv("AWS_ENDPOINT_INSECURE") == "" && os.Getenv("AWS_ENDPOINT_PROTO") == "https",
})
if err != nil {
return fmt.Errorf("init: error setting up minio client: %w", err)