From a3c64d6020cbf51cffa4375e700715272b56dd5a Mon Sep 17 00:00:00 2001 From: Kjetil Haugland Date: Tue, 1 Oct 2024 15:01:25 +0200 Subject: [PATCH] Los order muy importante --- .../Program.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clientBackend/src/Equinor.ProjectExecutionPortal.ClientBackend/Program.cs b/clientBackend/src/Equinor.ProjectExecutionPortal.ClientBackend/Program.cs index 459840f2..f224fb7e 100644 --- a/clientBackend/src/Equinor.ProjectExecutionPortal.ClientBackend/Program.cs +++ b/clientBackend/src/Equinor.ProjectExecutionPortal.ClientBackend/Program.cs @@ -104,14 +104,8 @@ app.UseResponseCaching(); -app.UseAuthentication(); - app.UseRouting(); -app.UseCors(); - -app.UseAuthorization(); - app.UseResponseCompression(); // Unless request matches any of these endpoint, the SPA will take control @@ -122,6 +116,12 @@ name: "default", pattern: "{controller=Bundle}/{action=Index}/{id?}"); +app.UseCors(); + +app.UseAuthentication(); + +app.UseAuthorization(); + // SPA Configuration app.MapSpaEndpoints(builder);