From 9f5aee9258d2879594a4dde48217765893343c67 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 3 Apr 2025 15:57:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9hir=20minio=20=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Helper/OSSService.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/IRaCIS.Core.Application/Helper/OSSService.cs b/IRaCIS.Core.Application/Helper/OSSService.cs index 4fd0137f2..0a888c09f 100644 --- a/IRaCIS.Core.Application/Helper/OSSService.cs +++ b/IRaCIS.Core.Application/Helper/OSSService.cs @@ -314,11 +314,18 @@ public class OSSService : IOSSService } else if (ObjectStoreServiceOptions.ObjectStoreUse == "MinIO") { + + var httpClientHandler = new HttpClientHandler + { + ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator + }; + var minIOConfig = ObjectStoreServiceOptions.MinIO; var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.EndPoint}:{minIOConfig.Port}") .WithCredentials(minIOConfig.AccessKeyId, minIOConfig.SecretAccessKey).WithSSL(minIOConfig.UseSSL) + .WithHttpClient(new HttpClient(httpClientHandler)) .Build(); var putObjectArgs = new PutObjectArgs()