From 66554062f5d7f899190db5a5627761c9825d482a Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Wed, 17 Apr 2024 01:20:36 +0200 Subject: [PATCH] [backend/startup] Fix middleware ordering for WASM debugging --- Iceshrimp.Backend/Startup.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Iceshrimp.Backend/Startup.cs b/Iceshrimp.Backend/Startup.cs index b93a1f6d..a20d853f 100644 --- a/Iceshrimp.Backend/Startup.cs +++ b/Iceshrimp.Backend/Startup.cs @@ -45,7 +45,9 @@ var app = builder.Build(); var config = await app.Initialize(args); // This determines the order of middleware execution in the request pipeline -if (!app.Environment.IsDevelopment()) +if (app.Environment.IsDevelopment()) + app.UseWebAssemblyDebugging(); +else app.UseResponseCompression(); app.UseRouting(); @@ -65,9 +67,6 @@ app.MapHub("/hubs/streaming"); app.MapRazorPages(); app.MapFallbackToPage("/Shared/FrontendSPA"); -if (app.Environment.IsDevelopment()) - app.UseWebAssemblyDebugging(); - app.Urls.Clear(); if (config.ListenSocket == null) app.Urls.Add($"http://{config.ListenHost}:{config.ListenPort}");