diff --git a/FastGithub.ReverseProxy/RequestLoggingMilldeware.cs b/FastGithub.ReverseProxy/RequestLoggingMilldeware.cs index e838031..38423d2 100644 --- a/FastGithub.ReverseProxy/RequestLoggingMilldeware.cs +++ b/FastGithub.ReverseProxy/RequestLoggingMilldeware.cs @@ -10,15 +10,15 @@ namespace FastGithub.ReverseProxy /// /// 请求日志中间件 /// - sealed class RequestLoggingMilldeware + sealed class RequestLoggingMiddleware { - private readonly ILogger logger; + private readonly ILogger logger; /// /// 请求日志中间件 /// /// - public RequestLoggingMilldeware(ILogger logger) + public RequestLoggingMiddleware(ILogger logger) { this.logger = logger; } @@ -31,8 +31,7 @@ namespace FastGithub.ReverseProxy /// public async Task InvokeAsync(HttpContext context, RequestDelegate next) { - var stopwatch = new Stopwatch(); - stopwatch.Start(); + var stopwatch = Stopwatch.StartNew(); try { diff --git a/FastGithub.ReverseProxy/ReverseProxyApplicationBuilderExtensions.cs b/FastGithub.ReverseProxy/ReverseProxyApplicationBuilderExtensions.cs index be7febd..8fcad59 100644 --- a/FastGithub.ReverseProxy/ReverseProxyApplicationBuilderExtensions.cs +++ b/FastGithub.ReverseProxy/ReverseProxyApplicationBuilderExtensions.cs @@ -16,8 +16,8 @@ namespace FastGithub /// public static IApplicationBuilder UseRequestLogging(this IApplicationBuilder app) { - var middlware = app.ApplicationServices.GetRequiredService(); - return app.Use(next => context => middlware.InvokeAsync(context, next)); + var middleware = app.ApplicationServices.GetRequiredService(); + return app.Use(next => context => middleware.InvokeAsync(context, next)); } /// diff --git a/FastGithub.ReverseProxy/ReverseProxyServiceCollectionExtensions.cs b/FastGithub.ReverseProxy/ReverseProxyServiceCollectionExtensions.cs index 1e1bddd..ea7bb81 100644 --- a/FastGithub.ReverseProxy/ReverseProxyServiceCollectionExtensions.cs +++ b/FastGithub.ReverseProxy/ReverseProxyServiceCollectionExtensions.cs @@ -19,7 +19,7 @@ namespace FastGithub .AddMemoryCache() .AddHttpForwarder() .AddSingleton() - .AddSingleton() + .AddSingleton() .AddSingleton(); } } diff --git a/FastGithub/Views/_ViewStart.cshtml b/FastGithub/Views/_ViewStart.cshtml index a5f1004..5f28270 100644 --- a/FastGithub/Views/_ViewStart.cshtml +++ b/FastGithub/Views/_ViewStart.cshtml @@ -1,3 +1 @@ -@{ - Layout = "_Layout"; -} + \ No newline at end of file