Update Startup.cs

This commit is contained in:
2025-07-25 18:24:50 +00:00
parent b9d7b1c9f7
commit 57f4cb7dda

View File

@@ -13,7 +13,6 @@ namespace FreelancerListServer
services.AddControllers().AddNewtonsoftJson(); // Für JSON-Serialisierung
services.AddSingleton<LiteDbManager>();
services.AddSingleton<Logger>();
// Optional: CORS aktivieren
services.AddCors(options =>
{
options.AddPolicy("AllowAll", builder =>
@@ -31,7 +30,7 @@ namespace FreelancerListServer
}
app.UseRouting();
app.UseCors("AllowAll"); // Optional: CORS aktivieren
app.UseCors("AllowAll");
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();