From 18ac612b557a1c5de8f3072ae34d7661faa52a84 Mon Sep 17 00:00:00 2001 From: Drew Rautenberg Date: Mon, 20 Jan 2025 21:19:21 -0600 Subject: [PATCH] Expand CORS policy to allow all HTTP methods. Updated the CORS configuration to permit any HTTP method for specified origins. This change enhances flexibility for client-server interactions while maintaining the defined security boundaries. --- barkmanAPI/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/barkmanAPI/Program.cs b/barkmanAPI/Program.cs index e0e9a95..67311e9 100644 --- a/barkmanAPI/Program.cs +++ b/barkmanAPI/Program.cs @@ -17,7 +17,7 @@ builder.Services.AddCors(options => options.AddPolicy(name: allowSpecificOrigins, policy => { - policy.WithOrigins("https://barkdev.ts.drewr.io", "http://localhost:5173"); + policy.WithOrigins("https://barkdev.ts.drewr.io", "http://localhost:5173").AllowAnyMethod(); }); }); var app = builder.Build();