diff --git a/SfeduSchedule/Program.cs b/SfeduSchedule/Program.cs index bcdb508..dc91579 100644 --- a/SfeduSchedule/Program.cs +++ b/SfeduSchedule/Program.cs @@ -10,6 +10,7 @@ using Microsoft.AspNetCore.HttpOverrides; using Microsoft.AspNetCore.Mvc.ApplicationParts; using SfeduSchedule.Auth; using Microsoft.AspNetCore.Authentication.OpenIdConnect; +using Prometheus; var builder = WebApplication.CreateBuilder(args); @@ -250,10 +251,15 @@ if (string.IsNullOrEmpty(preinstalledJwtToken)) app.UseSwagger(); app.UseSwaggerUI(); +app.UseStaticFiles(); + +app.UseRouting(); + app.UseAuthentication(); app.UseAuthorization(); -app.UseStaticFiles(); +app.UseHttpMetrics(); +app.UseRateLimiter(); app.MapGet("/", async context => { @@ -269,6 +275,4 @@ foreach (var p in loadedPlugins) p.Instance.MapEndpoints(app); } -app.UseRateLimiter(); - app.Run(); \ No newline at end of file diff --git a/SfeduSchedule/SfeduSchedule.csproj b/SfeduSchedule/SfeduSchedule.csproj index fbbee2b..9639159 100644 --- a/SfeduSchedule/SfeduSchedule.csproj +++ b/SfeduSchedule/SfeduSchedule.csproj @@ -13,7 +13,7 @@ - +