[backend/startup] Fix middleware ordering for WASM debugging
This commit is contained in:
parent
dca09cef56
commit
66554062f5
1 changed files with 3 additions and 4 deletions
|
@ -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<StreamingHub>("/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}");
|
||||
|
|
Loading…
Add table
Reference in a new issue