1
0
mirror of https://github.com/bitwarden/server synced 2025-12-14 23:33:41 +00:00

differentially inject playId middleware

This commit is contained in:
Matt Gibson
2025-11-18 09:38:18 -08:00
parent 439bf37b7f
commit ccc89e7268
2 changed files with 8 additions and 4 deletions

View File

@@ -29,7 +29,10 @@ builder.Services.AddQueries();
var app = builder.Build();
// Add PlayIdMiddleware services
app.UseMiddleware<PlayIdMiddleware>();
if (globalSettings.TestPlayIdTrackingEnabled)
{
app.UseMiddleware<PlayIdMiddleware>();
}
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
@@ -39,8 +42,6 @@ if (!app.Environment.IsDevelopment())
app.UseRouting();
app.MapControllerRoute(name: "default", pattern: "{controller=Seed}/{action=Index}/{id?}");
app.Run();
// Make Program class accessible for integration tests