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.
This commit is contained in:
2025-01-20 21:19:21 -06:00
parent 354823e00e
commit 18ac612b55
+1 -1
View File
@@ -17,7 +17,7 @@ builder.Services.AddCors(options =>
options.AddPolicy(name: allowSpecificOrigins, options.AddPolicy(name: allowSpecificOrigins,
policy => 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(); var app = builder.Build();