From 7c92a7e791e00e7ecca97f976dd720de331c7700 Mon Sep 17 00:00:00 2001 From: Sergio Matias Date: Sun, 27 Jul 2025 19:35:00 -0600 Subject: [PATCH] Chande DI order --- Core.Thalos.DAL.API/Program.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Core.Thalos.DAL.API/Program.cs b/Core.Thalos.DAL.API/Program.cs index f25d640..8c1489d 100644 --- a/Core.Thalos.DAL.API/Program.cs +++ b/Core.Thalos.DAL.API/Program.cs @@ -66,19 +66,22 @@ builder.Host.ConfigureServices((context, services) => var app = builder.Build(); +app.UseLogging(builder.Configuration); app.UseSwaggerUI(builder.Configuration, authSettings); -app.MapControllers(); -app.UseCors(); app.ConfigureSwagger(builder.Configuration); + +app.UseRouting(); +app.UseCors(); app.UseHttpsRedirection(); app.UseStaticFiles(); -app.UseRouting(); app.UseResponseCompression(); app.UseOutputCache(); app.UseResponseCaching(); + app.UseAuthentication(); app.UseAuthorization(); -app.UseLogging(builder.Configuration); + +app.MapControllers(); app.MapHealthChecks("/health"); app.Run(); \ No newline at end of file