fix(region): aliyun oss https

This commit is contained in:
ioito
2022-05-25 16:53:01 +08:00
parent 3c36c496a1
commit 0cd2ffb077
+3
View File
@@ -565,6 +565,9 @@ func (client *SAliyunClient) getOssClientByEndpoint(endpoint string) (*oss.Clien
cliOpts := []oss.ClientOption{
oss.HTTPClient(httpClient),
}
if !strings.HasPrefix(endpoint, "http") {
endpoint = "https://" + endpoint
}
cli, err := oss.New(endpoint, client.accessKey, client.accessSecret, cliOpts...)
if err != nil {
return nil, errors.Wrap(err, "oss.New")