Skip to content

Commit

Permalink
sessionInfo.Endpoint includes the scheme so it was mandatory to check…
Browse files Browse the repository at this point in the history
… for "https://"

Signed-off-by: Achyut Madhusudan <amadhusu@redhat.com>
  • Loading branch information
Achyut Madhusudan committed Apr 9, 2024
1 parent 942f658 commit 7428dc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/v2/objectstore/object_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ func createBucketSession(ctx context.Context, namespace string, sessionInfo *Ses
// for (1) the endpoint is not required, thus we skip it, otherwise the writer will fail to close due to region mismatch.
// https://aws.amazon.com/blogs/infrastructure-and-automation/best-practices-for-using-amazon-s3-endpoints-in-aws-cloudformation-templates/
// https://docs.aws.amazon.com/sdk-for-go/api/aws/session/
if strings.ToLower(sessionInfo.Endpoint) != "s3.amazonaws.com" {
if strings.ToLower(sessionInfo.Endpoint) != "https://s3.amazonaws.com" {
config.Endpoint = aws.String(sessionInfo.Endpoint)
glog.Infof("%s is the current config endpoint", config.Endpoint)
}
Expand Down

0 comments on commit 7428dc7

Please sign in to comment.