diff --git a/ProjectLighthouse.Servers.API/Startup/ApiStartup.cs b/ProjectLighthouse.Servers.API/Startup/ApiStartup.cs index 68c5aecf..c0469ef6 100644 --- a/ProjectLighthouse.Servers.API/Startup/ApiStartup.cs +++ b/ProjectLighthouse.Servers.API/Startup/ApiStartup.cs @@ -1,6 +1,5 @@ -using LBPUnion.ProjectLighthouse.Helpers; +using LBPUnion.ProjectLighthouse.Middlewares; using LBPUnion.ProjectLighthouse.Serialization; -using LBPUnion.ProjectLighthouse.Startup.Middlewares; using Microsoft.OpenApi.Models; namespace LBPUnion.ProjectLighthouse.Servers.API.Startup; diff --git a/ProjectLighthouse.Servers.GameServer/Startup/GameServerStartup.cs b/ProjectLighthouse.Servers.GameServer/Startup/GameServerStartup.cs index 0868d72d..2dd9a0bb 100644 --- a/ProjectLighthouse.Servers.GameServer/Startup/GameServerStartup.cs +++ b/ProjectLighthouse.Servers.GameServer/Startup/GameServerStartup.cs @@ -1,7 +1,7 @@ using LBPUnion.ProjectLighthouse.Helpers; using LBPUnion.ProjectLighthouse.Logging; +using LBPUnion.ProjectLighthouse.Middlewares; using LBPUnion.ProjectLighthouse.Serialization; -using LBPUnion.ProjectLighthouse.Startup.Middlewares; using LBPUnion.ProjectLighthouse.Types; using LBPUnion.ProjectLighthouse.Types.Settings; using Microsoft.AspNetCore.HttpOverrides; diff --git a/ProjectLighthouse.Servers.Website/Startup/WebsiteStartup.cs b/ProjectLighthouse.Servers.Website/Startup/WebsiteStartup.cs index d2395ed9..eddca5a7 100644 --- a/ProjectLighthouse.Servers.Website/Startup/WebsiteStartup.cs +++ b/ProjectLighthouse.Servers.Website/Startup/WebsiteStartup.cs @@ -1,5 +1,5 @@ +using LBPUnion.ProjectLighthouse.Middlewares; using LBPUnion.ProjectLighthouse.Startup; -using LBPUnion.ProjectLighthouse.Startup.Middlewares; using Microsoft.AspNetCore.HttpOverrides; namespace LBPUnion.ProjectLighthouse.Servers.Website.Startup; diff --git a/ProjectLighthouse/Startup/Middlewares/RequestLogMiddleware.cs b/ProjectLighthouse/Middlewares/RequestLogMiddleware.cs similarity index 91% rename from ProjectLighthouse/Startup/Middlewares/RequestLogMiddleware.cs rename to ProjectLighthouse/Middlewares/RequestLogMiddleware.cs index 280a2e80..dfadfc9e 100644 --- a/ProjectLighthouse/Startup/Middlewares/RequestLogMiddleware.cs +++ b/ProjectLighthouse/Middlewares/RequestLogMiddleware.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using LBPUnion.ProjectLighthouse.Logging; using Microsoft.AspNetCore.Http; -namespace LBPUnion.ProjectLighthouse.Startup.Middlewares; +namespace LBPUnion.ProjectLighthouse.Middlewares; public class RequestLogMiddleware { @@ -28,7 +28,7 @@ public class RequestLogMiddleware // Log all headers. // foreach (KeyValuePair header in context.Request.Headers) Logger.Log($"{header.Key}: {header.Value}"); - await next(context); // Handle the request so we can get the status code from it + await this.next(context); // Handle the request so we can get the status code from it requestStopwatch.Stop(); diff --git a/ProjectLighthouse/ProjectLighthouse.csproj b/ProjectLighthouse/ProjectLighthouse.csproj index 6bb28b54..014ecd0e 100644 --- a/ProjectLighthouse/ProjectLighthouse.csproj +++ b/ProjectLighthouse/ProjectLighthouse.csproj @@ -20,6 +20,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -52,6 +53,10 @@ + + + +