From 087708dcf7cf7229548d7c26204353bcf4cc43d4 Mon Sep 17 00:00:00 2001 From: OlgunR Date: Tue, 21 Apr 2026 15:22:19 +0200 Subject: [PATCH] Use array literal [] for empty CORS origins default Replaces Array.Empty() with the C# array literal [] when defaulting the CORS allowed origins array. This is a syntactic improvement with no change in behavior. --- DbFirst.API/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DbFirst.API/Program.cs b/DbFirst.API/Program.cs index 2ae820a..350b3bd 100644 --- a/DbFirst.API/Program.cs +++ b/DbFirst.API/Program.cs @@ -30,7 +30,7 @@ builder.Services.AddCors(options => } else { - var origins = builder.Configuration.GetSection("Cors:AllowedOrigins").Get() ?? Array.Empty(); + var origins = builder.Configuration.GetSection("Cors:AllowedOrigins").Get() ?? []; if (origins.Length > 0) { policy.WithOrigins(origins)