From eed17feae0e04d34023c071d4dc177dc1d928a2b Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 3 Apr 2025 16:20:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=87=AA=E7=AD=BE=E7=BD=B2ht?= =?UTF-8?q?tps=20minio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Helper/OSSService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/IRaCIS.Core.Application/Helper/OSSService.cs b/IRaCIS.Core.Application/Helper/OSSService.cs index 0a888c09f..6de4d34ed 100644 --- a/IRaCIS.Core.Application/Helper/OSSService.cs +++ b/IRaCIS.Core.Application/Helper/OSSService.cs @@ -223,11 +223,17 @@ 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()