refactor(Program): update MiniProfiler options to use miniProfilerOptions and add DocumentDownloadType setting

This commit is contained in:
Jean Gatto
2025-07-03 09:38:05 -03:00
parent 6133e8a73a
commit 4f419f52df
+7 -6
View File
@@ -75,14 +75,14 @@ builder.Services
// MiniProfiler for .NET
// https://miniprofiler.com/dotnet/
builder.Services.AddMiniProfiler(options =>
builder.Services.AddMiniProfiler(miniProfilerOptions =>
{
// Route: /profiler/results-index
options.RouteBasePath = "/profiler";
options.ColorScheme = ColorScheme.Dark;
options.EnableServerTimingHeader = true;
options.TrackConnectionOpenClose = true;
options.EnableDebugMode = builder.Environment.IsDevelopment();
miniProfilerOptions.RouteBasePath = "/profiler";
miniProfilerOptions.ColorScheme = ColorScheme.Dark;
miniProfilerOptions.EnableServerTimingHeader = true;
miniProfilerOptions.TrackConnectionOpenClose = true;
miniProfilerOptions.EnableDebugMode = builder.Environment.IsDevelopment();
}).AddEntityFramework();
// Validating the services added in the ASP.NET Core DI.
@@ -121,6 +121,7 @@ app.MapScalarApiReference(scalarOptions =>
scalarOptions.DarkMode = true;
scalarOptions.DotNetFlag = false;
scalarOptions.HideModels = true;
scalarOptions.DocumentDownloadType = DocumentDownloadType.None;
scalarOptions.Title = "Shop API";
});