mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-06-05 07:32:28 +00:00
Organize middlewares
This commit is contained in:
parent
2e8c59a16f
commit
08be90aadc
5 changed files with 10 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<string, StringValues> 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();
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.1"/>
|
||||
<PackageReference Include="Redis.OM" Version="0.1.9"/>
|
||||
<PackageReference Include="SharpZipLib" Version="1.3.3"/>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.1"/>
|
||||
<PackageReference Include="YamlDotNet" Version="11.2.1"/>
|
||||
|
@ -52,6 +53,10 @@
|
|||
<Compile Remove="Extensions\SerializationExtensions.cs"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Startup\Middlewares"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||
<Exec Command="git describe --long --always --dirty --exclude=\* --abbrev=8 > "$(ProjectDir)/gitVersion.txt""/>
|
||||
<Exec Command="git branch --show-current > "$(ProjectDir)/gitBranch.txt""/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue