Refactored starup pipeline
continuous-integration/drone/pr Build is passing

This commit is contained in:
Khwezi Mngoma
2026-06-14 12:23:23 +02:00
parent 9cbde6e622
commit 596ab396a4
+2 -1
View File
@@ -49,6 +49,8 @@ builder.Services.Configure<ForwardedHeadersOptions>(options =>
var app = builder.Build(); var app = builder.Build();
app.UseForwardedHeaders();
using var security = app.Services.CreateScope(); using var security = app.Services.CreateScope();
{ {
var dataProtectionContext = security.ServiceProvider.GetRequiredService<DataProtectionDbContext>(); var dataProtectionContext = security.ServiceProvider.GetRequiredService<DataProtectionDbContext>();
@@ -56,7 +58,6 @@ using var security = app.Services.CreateScope();
await dataProtectionContext.Database.MigrateAsync(); await dataProtectionContext.Database.MigrateAsync();
} }
app.UseForwardedHeaders();
app.AddSecurityEndpoints(); app.AddSecurityEndpoints();
var schedulerFactory = app.Services.GetRequiredService<ISchedulerFactory>(); var schedulerFactory = app.Services.GetRequiredService<ISchedulerFactory>();