From 70233af5426b0d1c343ebe87183303a34a9aaa58 Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期三, 20 十一月 2024 09:05:38 +0800 Subject: [PATCH] WIDESEAWCS_QuartzJob更新版本 --- WIDESEAWCS_Server/WIDESEAWCS_Core/Extensions/CorsSetup.cs | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/WIDESEAWCS_Server/WIDESEAWCS_Core/Extensions/CorsSetup.cs b/WIDESEAWCS_Server/WIDESEAWCS_Core/Extensions/CorsSetup.cs index 0e7c4b7..6cd3b85 100644 --- a/WIDESEAWCS_Server/WIDESEAWCS_Core/Extensions/CorsSetup.cs +++ b/WIDESEAWCS_Server/WIDESEAWCS_Core/Extensions/CorsSetup.cs @@ -24,14 +24,14 @@ services.AddCors(c => { - if (!AppSettings.app(new string[] { "Cors", "EnableAllIPs" }).ObjToBool()) + if (!AppSettings.Get(new string[] { "Cors", "EnableAllIPs" }).ObjToBool()) { - c.AddPolicy(AppSettings.app(new string[] {"Cors", "PolicyName" }), + c.AddPolicy(AppSettings.Get(new string[] {"Cors", "PolicyName" }), policy => { policy - .WithOrigins(AppSettings.app(new string[] { "Cors", "IPs" }).Split(',')) + .WithOrigins(AppSettings.Get(new string[] { "Cors", "IPs" }).Split(',')) .AllowAnyHeader()//Ensures that the policy allows any header. .AllowAnyMethod(); }); @@ -39,7 +39,7 @@ else { //鍏佽浠绘剰璺ㄥ煙璇锋眰 - c.AddPolicy(AppSettings.app(new string[] { "Cors", "PolicyName" }), + c.AddPolicy(AppSettings.Get(new string[] { "Cors", "PolicyName" }), policy => { policy -- Gitblit v1.9.3