Skip to content

Commit

Permalink
perf: fix minio s3 failed
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Oct 15, 2024
1 parent b86f151 commit 84a5e30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/storage/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ func ParseEndpointRegion(s string) string {
}
endpoint, err := url.Parse(s)
if err != nil {
return ""
return s
}
endpoints := strings.Split(endpoint.Hostname(), ".")
if len(endpoints) >= 3 {
return endpoints[len(endpoints)-3]
}
return ""
return endpoints[0]
}

func ParseAWSURLRegion(s string) string {
Expand Down

0 comments on commit 84a5e30

Please sign in to comment.