This commit is contained in:
2025-05-13 11:37:47 +08:00
parent 643fbe63fc
commit 41ff294afc
2 changed files with 177 additions and 7 deletions

View File

@@ -23,5 +23,18 @@ public class Startup : DefaultStartup
{
base.ConfigureServices(services);
services.AddRedis();
services.AddHttpClient("hik-openapi")
.ConfigureHttpClient(client => { client.BaseAddress = new Uri("https://10.32.0.10"); })
.ConfigurePrimaryHttpMessageHandler(() =>
{
var handler = new HttpClientHandler
{
ClientCertificateOptions = ClientCertificateOption.Manual,
ServerCertificateCustomValidationCallback = (_, _, _, _) => true
};
return handler;
});
}
}