[backend/startup] Only enable UseWebAssemblyDebugging in Debug configuration
This commit is contained in:
parent
fe68c03428
commit
523dd80ea9
1 changed files with 4 additions and 0 deletions
|
@ -45,10 +45,14 @@ var app = builder.Build();
|
||||||
var config = await app.Initialize(args);
|
var config = await app.Initialize(args);
|
||||||
|
|
||||||
// This determines the order of middleware execution in the request pipeline
|
// This determines the order of middleware execution in the request pipeline
|
||||||
|
#if DEBUG
|
||||||
if (app.Environment.IsDevelopment())
|
if (app.Environment.IsDevelopment())
|
||||||
app.UseWebAssemblyDebugging();
|
app.UseWebAssemblyDebugging();
|
||||||
else
|
else
|
||||||
app.UseResponseCompression();
|
app.UseResponseCompression();
|
||||||
|
#else
|
||||||
|
app.UseResponseCompression();
|
||||||
|
#endif
|
||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
app.UseSwaggerWithOptions();
|
app.UseSwaggerWithOptions();
|
||||||
|
|
Loading…
Add table
Reference in a new issue