Fix authenticated resource usage tracking

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Paul Schneider 2026-10-10 20:03:19 +01:00
commit 7ee0c30500
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
4 changed files with 31 additions and 2 deletions

View file

@ -98,11 +98,11 @@ internal class Program
{
if (app.Environment.IsDevelopment())
app.UseDeveloperExceptionPage();
app.UseMiddleware<ResourceUsageTelemetryMiddleware>();
app
.UseRouting()
.UseAuthentication()
.UseAuthorization()
.UseMiddleware<ResourceUsageTelemetryMiddleware>()
.UseCors("default")
;
app.Services.GetRequiredService<ILoggerFactory>().CreateLogger("Program")