Update Startup.cs
This commit is contained in:
@@ -13,7 +13,6 @@ namespace FreelancerListServer
|
|||||||
services.AddControllers().AddNewtonsoftJson(); // Für JSON-Serialisierung
|
services.AddControllers().AddNewtonsoftJson(); // Für JSON-Serialisierung
|
||||||
services.AddSingleton<LiteDbManager>();
|
services.AddSingleton<LiteDbManager>();
|
||||||
services.AddSingleton<Logger>();
|
services.AddSingleton<Logger>();
|
||||||
// Optional: CORS aktivieren
|
|
||||||
services.AddCors(options =>
|
services.AddCors(options =>
|
||||||
{
|
{
|
||||||
options.AddPolicy("AllowAll", builder =>
|
options.AddPolicy("AllowAll", builder =>
|
||||||
@@ -31,7 +30,7 @@ namespace FreelancerListServer
|
|||||||
}
|
}
|
||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
app.UseCors("AllowAll"); // Optional: CORS aktivieren
|
app.UseCors("AllowAll");
|
||||||
app.UseEndpoints(endpoints =>
|
app.UseEndpoints(endpoints =>
|
||||||
{
|
{
|
||||||
endpoints.MapControllers();
|
endpoints.MapControllers();
|
||||||
|
|||||||
Reference in New Issue
Block a user