feat: Ocelot-Konfigurationsdatei für die Entwicklung hinzugefügt.

This commit is contained in:
Developer 02
2025-03-10 14:33:30 +01:00
parent 0efb035d12
commit 6a536e950d
2 changed files with 98 additions and 1 deletions

View File

@@ -4,7 +4,8 @@ using Ocelot.Middleware;
var builder = WebApplication.CreateBuilder(args);
// Make sure to add the Ocelot configuration file
builder.Configuration.AddJsonFile("ocelot.json");
var suffix = builder.Environment.IsDevelopment() ? ".Development" : "";
builder.Configuration.AddJsonFile($"ocelot{suffix}.json");
// Add Ocelot services
builder.Services.AddOcelot();