From e2c774678960a9c6bf501f65846a14c8f6809609 Mon Sep 17 00:00:00 2001 From: yk Date: Tue, 13 Feb 2024 18:45:26 +0200 Subject: [PATCH] Update src/OrchardCore.Modules/OrchardCore.Cors/Controllers/AdminController.cs Co-authored-by: Mike Alhayek --- .../OrchardCore.Cors/Controllers/AdminController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OrchardCore.Modules/OrchardCore.Cors/Controllers/AdminController.cs b/src/OrchardCore.Modules/OrchardCore.Cors/Controllers/AdminController.cs index f1883baff61..b437bd36719 100644 --- a/src/OrchardCore.Modules/OrchardCore.Cors/Controllers/AdminController.cs +++ b/src/OrchardCore.Modules/OrchardCore.Cors/Controllers/AdminController.cs @@ -113,8 +113,8 @@ public async Task IndexPOST() AllowedMethods = settingViewModel.AllowedMethods, AllowedOrigins = settingViewModel.AllowedOrigins, IsDefaultPolicy = settingViewModel.IsDefaultPolicy - }); + if (settingViewModel.AllowAnyOrigin && settingViewModel.AllowCredentials) { policyWarnings.Add($"{settingViewModel.Name}");