From 4d7eaafd273e68393c323e53194d9ae24206c3c9 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Mon, 18 Jan 2021 21:43:58 -0600 Subject: reorder middleware --- src/slskd/Startup.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/slskd/Startup.cs b/src/slskd/Startup.cs index 83f6dd1b..b6ef0788 100644 --- a/src/slskd/Startup.cs +++ b/src/slskd/Startup.cs @@ -196,17 +196,11 @@ } app.UseCors("AllowAll"); - app.UseAuthentication(); - - app.UseSerilogRequestLogging(); - - app.UseRouting(); - app.UseHttpMetrics(); app.UsePathBase(BasePath); // remove any errant double forward slashes which may have been introduced // by a reverse proxy or having the base path removed - app.Use(async (context, next) => + app.Use(async (context, next) => { var path = context.Request.Path.ToString(); @@ -228,6 +222,12 @@ app.UseFileServer(fileServerOptions); + app.UseSerilogRequestLogging(); + app.UseHttpMetrics(); + + app.UseAuthentication(); + + app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { -- cgit v1.2.3