Skip to content

Commit 47fc0bb

Browse files
fix
1 parent 83d504a commit 47fc0bb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

storage/backend/s3/s3.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ type Backend struct {
3333
// New creates an S3 backend.
3434
func New(l log.Logger, c Config, debug bool) (*Backend, error) {
3535
conf := &aws.Config{
36-
Region: aws.String(c.Region),
37-
Endpoint: &c.Endpoint,
38-
DisableSSL: aws.Bool(!strings.HasPrefix(c.Endpoint, "https://")),
39-
S3ForcePathStyle: aws.Bool(c.PathStyle),
36+
Region: aws.String(c.Region),
37+
}
38+
if c.Endpoint != "" {
39+
conf.Endpoint = aws.String(c.Endpoint)
40+
conf.S3ForcePathStyle = aws.Bool(true)
4041
}
4142

4243
// Use anonymous credentials if the S3 bucket is public

0 commit comments

Comments
 (0)