[backend/startup] Only enable UseWebAssemblyDebugging in Debug configuration

This commit is contained in:
Laura Hausmann 2024-04-18 18:56:58 +02:00
parent fe68c03428
commit 523dd80ea9
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -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();