Refactored starup pipeline #75
@@ -49,6 +49,8 @@ builder.Services.Configure<ForwardedHeadersOptions>(options =>
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseForwardedHeaders();
|
||||
|
||||
using var security = app.Services.CreateScope();
|
||||
{
|
||||
var dataProtectionContext = security.ServiceProvider.GetRequiredService<DataProtectionDbContext>();
|
||||
@@ -56,7 +58,6 @@ using var security = app.Services.CreateScope();
|
||||
await dataProtectionContext.Database.MigrateAsync();
|
||||
}
|
||||
|
||||
app.UseForwardedHeaders();
|
||||
app.AddSecurityEndpoints();
|
||||
|
||||
var schedulerFactory = app.Services.GetRequiredService<ISchedulerFactory>();
|
||||
|
||||
Reference in New Issue
Block a user