feat:云同步,部分功能生效
This commit is contained in:
@@ -29,6 +29,18 @@ public static class CloudSyncServiceCollectionExtensions
|
||||
services.AddScoped<CloudTaskSyncService>();
|
||||
services.AddScoped<SecurityPolicyService>();
|
||||
|
||||
// 注册探测服务专用的 HttpClient(仅限服务端,MAUI 端不注册 AddCloudSyncServer)
|
||||
// 关闭 SSL 证书校验:探测目标可能是自签证书或内网服务器
|
||||
services.AddHttpClient("ProbeClient", client =>
|
||||
{
|
||||
client.DefaultRequestHeaders.UserAgent.ParseAdd("HuaTodo-Probe/1.0");
|
||||
})
|
||||
.ConfigurePrimaryHttpMessageHandler(() => new HttpClientHandler
|
||||
{
|
||||
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
|
||||
});
|
||||
services.AddScoped<CloudProbeService>();
|
||||
|
||||
services.AddAuthentication(SessionAuthenticationDefaults.Scheme)
|
||||
.AddScheme<AuthenticationSchemeOptions, SessionAuthenticationHandler>(SessionAuthenticationDefaults.Scheme, _ => { });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user