Stable API run #47

Merged
khwezi merged 1 commits from garages3 into main 2026-09-13 17:41:42 +02:00
2 changed files with 3 additions and 8 deletions
+1 -7
View File
@@ -91,12 +91,6 @@ builder.Services.AddOpenApi(options =>
});
});
builder.Services.AddCors(options => options.AddPolicy("AllowFrontend", policy =>
policy.WithOrigins("https://localhost:3000", "https://localhost:8076", "https://console.ifri.khongisa.co.za")
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials()));
var app = builder.Build();
var schedulerFactory = app.Services.GetRequiredService<ISchedulerFactory>();
@@ -109,7 +103,7 @@ app.UseHsts();
app.UseHttpsRedirection();
app.UseRouting();
app.UseCors("AllowFrontend");
app.UseOutputCache();
app.UseAuthentication();
app.UseAuthorization();
@@ -97,6 +97,7 @@ public static class Security
options.Scope.Clear();
options.Scope.Add("openid");
options.Scope.Add("profile");
options.Scope.Add("role");
options.Scope.Add("email");
options.Events = new OpenIdConnectEvents
@@ -137,7 +138,7 @@ public static class Security
{
options.MapInboundClaims = false;
options.Authority = authOptions.Authority;
options.Audience = authOptions.Audience;
options.Audience = authOptions.Audience;
options.TokenValidationParameters = new TokenValidationParameters
{