mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-22 13:20:29 +01:00
update README, save some indentation
This commit is contained in:
parent
7f0f173115
commit
5245b5882f
@ -162,7 +162,8 @@ You can populate below template according to your requirements and use it as you
|
|||||||
|
|
||||||
# Setting this variable to `true` will disable verification of
|
# Setting this variable to `true` will disable verification of
|
||||||
# SSL certificates. You shouldn't use this unless you use self-signed
|
# SSL certificates. You shouldn't use this unless you use self-signed
|
||||||
# certificates for your remote storage backend.
|
# certificates for your remote storage backend. This can only be used
|
||||||
|
# when AWS_ENDPOINT_PROTO is set to `https`.
|
||||||
|
|
||||||
# AWS_ENDPOINT_INSECURE="true"
|
# AWS_ENDPOINT_INSECURE="true"
|
||||||
|
|
||||||
|
@ -159,21 +159,23 @@ func newScript() (*script, error) {
|
|||||||
} else {
|
} else {
|
||||||
return nil, errors.New("newScript: AWS_S3_BUCKET_NAME is defined, but no credentials were provided")
|
return nil, errors.New("newScript: AWS_S3_BUCKET_NAME is defined, but no credentials were provided")
|
||||||
}
|
}
|
||||||
|
|
||||||
options := minio.Options{
|
options := minio.Options{
|
||||||
Creds: creds,
|
Creds: creds,
|
||||||
Secure: s.c.AwsEndpointProto == "https",
|
Secure: s.c.AwsEndpointProto == "https",
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.c.AwsEndpointInsecure {
|
if s.c.AwsEndpointInsecure {
|
||||||
if options.Secure {
|
if !options.Secure {
|
||||||
transport, err := minio.DefaultTransport(options.Secure)
|
return nil, errors.New("newScript: AWS_ENDPOINT_INSECURE = true is only meaningful for https")
|
||||||
|
}
|
||||||
|
|
||||||
|
transport, err := minio.DefaultTransport(true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("newScript: failed to create default minio transport")
|
return nil, fmt.Errorf("newScript: failed to create default minio transport")
|
||||||
}
|
}
|
||||||
transport.TLSClientConfig.InsecureSkipVerify = true
|
transport.TLSClientConfig.InsecureSkipVerify = true
|
||||||
options.Transport = transport
|
options.Transport = transport
|
||||||
} else {
|
|
||||||
return nil, errors.New("newScript: AWS_ENDPOINT_INSECURE = true is only meaningful for https")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mc, err := minio.New(s.c.AwsEndpoint, &options)
|
mc, err := minio.New(s.c.AwsEndpoint, &options)
|
||||||
|
Loading…
Reference in New Issue
Block a user