提交 3ffdbb64 编写于 作者: demodemo's avatar demodemo 提交者: Davies Liu

add ctyun xstore support (#92)

上级 3acbc420
......@@ -50,12 +50,13 @@ func newOOS(endpoint, accessKey, secretKey string) (ObjectStorage, error) {
bucket := hostParts[0]
region := hostParts[1][4:]
endpoint = uri.Host[len(bucket)+1:]
forcePathStyle := strings.Contains(strings.ToLower(endpoint), "xstore.ctyun.cn")
awsConfig := &aws.Config{
Region: &region,
Endpoint: &endpoint,
DisableSSL: aws.Bool(!ssl),
S3ForcePathStyle: aws.Bool(true),
S3ForcePathStyle: aws.Bool(!forcePathStyle),
// HTTPClient: httpClient,
Credentials: credentials.NewStaticCredentials(accessKey, secretKey, ""),
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册