From 596ab396a4b0bfc632be16f1e74577c207f758d8 Mon Sep 17 00:00:00 2001 From: Khwezi Mngoma Date: Sun, 14 Jun 2026 12:23:23 +0200 Subject: [PATCH] Refactored starup pipeline --- MidrandBookshop/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); -- 2.47.3