22 lines
644 B
C#
22 lines
644 B
C#
using Kurisu.RemoteCall.Abstractions;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Dlhis.Dh.Api.Clients;
|
|
|
|
public class DhClientHandler : IHttpRemoteCallPolicyHandler
|
|
{
|
|
/// <inheritdoc />
|
|
public IHttpClientBuilder ConfigureHttpClient(IHttpClientBuilder builder)
|
|
{
|
|
return builder.ConfigurePrimaryHttpMessageHandler(() =>
|
|
{
|
|
var handler = new HttpClientHandler
|
|
{
|
|
ClientCertificateOptions = ClientCertificateOption.Manual,
|
|
ServerCertificateCustomValidationCallback = (_, _, _, _) => true
|
|
};
|
|
|
|
return handler;
|
|
});
|
|
}
|
|
} |