From a45843db3145f76bd16def86f65172b5e04eb2da Mon Sep 17 00:00:00 2001 From: verzcar Date: Sun, 15 Oct 2023 19:42:51 +0200 Subject: [PATCH] added s3 default url --- aws_s3.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/aws_s3.go b/aws_s3.go index 97954f5..a4df580 100644 --- a/aws_s3.go +++ b/aws_s3.go @@ -24,7 +24,18 @@ func initS3Session(s3Config *S3RequestConfig) *s3Client { }, }, ), + config.WithEndpointResolverWithOptions( + aws.EndpointResolverWithOptionsFunc( + func( + service, region string, + options ...interface{}, + ) (aws.Endpoint, error) { + return aws.Endpoint{URL: s3Config.defaultBaseURL}, nil + }, + ), + ), ) + if err != nil { panic(err) }