mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Add authentication to metrics.
This commit is contained in:
@@ -71,7 +71,13 @@ namespace DiscImageChef.Server
|
||||
endpoints.MapRazorPages();
|
||||
});
|
||||
|
||||
app.UseMetricServer();
|
||||
app.Map("/metrics", metricsApp =>
|
||||
{
|
||||
metricsApp.UseMiddleware<BasicAuthMiddleware>("DiscImageChef");
|
||||
|
||||
// We already specified URL prefix in .Map() above, no need to specify it again here.
|
||||
metricsApp.UseMetricServer("");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user