diff --git a/MidrandBookshop/Program.cs b/MidrandBookshop/Program.cs index 6837eb7..2054324 100644 --- a/MidrandBookshop/Program.cs +++ b/MidrandBookshop/Program.cs @@ -49,6 +49,8 @@ builder.Services.Configure(options => var app = builder.Build(); +app.UseForwardedHeaders(); + using var security = app.Services.CreateScope(); { var dataProtectionContext = security.ServiceProvider.GetRequiredService(); @@ -56,7 +58,6 @@ using var security = app.Services.CreateScope(); await dataProtectionContext.Database.MigrateAsync(); } -app.UseForwardedHeaders(); app.AddSecurityEndpoints(); var schedulerFactory = app.Services.GetRequiredService();