瀏覽代碼

reset 回滚错误修改

疯狂的狮子Li 6 月之前
父節點
當前提交
761586cc3c

+ 3 - 3
ruoyi-common/ruoyi-common-oss/src/main/java/org/dromara/common/oss/core/OssClient.java

@@ -83,10 +83,10 @@ public class OssClient {
             StaticCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
                 AwsBasicCredentials.create(properties.getAccessKey(), properties.getSecretKey()));
 
-            //使用对象存储服务时要求明确配置访问样式(路径样式或虚拟托管样式)。需要启用路径样式访问
-            boolean isStyle = true;
+            // MinIO 使用 HTTPS 限制使用域名访问,站点填域名。需要启用路径样式访问
+            boolean isStyle = !StringUtils.containsAny(properties.getEndpoint(), OssConstant.CLOUD_SERVICE);
 
-            //创建AWS基于 CRT 的 S3 客户端
+            // 创建AWS基于 CRT 的 S3 客户端
             this.client = S3AsyncClient.crtBuilder()
                 .credentialsProvider(credentialsProvider)
                 .endpointOverride(URI.create(getEndpoint()))