Skip to content

Commit

Permalink
fix(export): support for any s3 endpoint (#8978)
Browse files Browse the repository at this point in the history
Description: Many blob storage providers support the S3 API, e.g.:
Cloudflare R2, Backblaze B2. This fix allows to use any S3 endpoint.
Fixes: #8940
  • Loading branch information
superkeka authored Aug 26, 2023
1 parent 4e89c4e commit cc58d38
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions x/minioclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/golang/glog"
minio "github.com/minio/minio-go/v6"
"github.com/minio/minio-go/v6/pkg/credentials"
"github.com/minio/minio-go/v6/pkg/s3utils"
"github.com/pkg/errors"
)

Expand Down Expand Up @@ -90,9 +89,6 @@ func NewMinioClient(uri *url.URL, creds *MinioCredentials) (*MinioClient, error)
if !strings.Contains(uri.Host, ".") {
uri.Host = defaultEndpointS3
}
if !s3utils.IsAmazonEndpoint(*uri) {
return nil, errors.Errorf("Invalid S3 endpoint %q", uri.Host)
}
default: // minio
if uri.Host == "" {
return nil, errors.Errorf("Minio handler requires a host")
Expand Down

0 comments on commit cc58d38

Please sign in to comment.