李昊 4 éve
szülő
commit
7af3b0eb4b

+ 2 - 1
GxPress/Repository/GxPress.Repository.Implement/UserRepository.cs

@@ -649,7 +649,8 @@ namespace GxPress.Repository.Implement
             try
             {
                 var imServiceUrl = ConfigHelper.GetValue("ServiceAddress:ImUrl");
-                HttpClient httpClient = new HttpClient(); //http对象
+                var httpClientHandler=new HttpClientHandler{ServerCertificateCustomValidationCallback=HttpClientHandler.DangerousAcceptAnyServerCertificateValidator};
+                HttpClient httpClient = new HttpClient(httpClientHandler); //http对象
                 HttpResponseMessage response = await httpClient.PostAsync(
                     $"{imServiceUrl}/users",
                     new JsonContent(new { username = request.Phone, password = "123456", nickname = request.Name }));