Update Startup.cs
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user