|
|
@@ -85,7 +85,9 @@ public class OssClient {
|
|
|
AwsBasicCredentials.create(properties.getAccessKey(), properties.getSecretKey()));
|
|
|
|
|
|
// MinIO 使用 HTTPS 限制使用域名访问,站点填域名。需要启用路径样式访问
|
|
|
- boolean isStyle = !StringUtils.containsAny(properties.getEndpoint(), OssConstant.CLOUD_SERVICE);
|
|
|
+ // 阿里云OSS、腾讯云COS、七牛云等云服务商使用虚拟主机样式访问
|
|
|
+ boolean isStyle = !StringUtils.containsAny(properties.getEndpoint(), OssConstant.CLOUD_SERVICE)
|
|
|
+ && !StringUtils.containsAny(properties.getEndpoint(), new String[]{"aliyuncs.com", "myqcloud.com", "qiniucs.com"});
|
|
|
|
|
|
// 创建AWS基于 Netty 的 S3 客户端
|
|
|
this.client = S3AsyncClient.builder()
|