From ccefa272f367a9c66641e53f340a721d043f2db7 Mon Sep 17 00:00:00 2001 From: zhangxiaofeng <1939543722@qq.com> Date: Tue, 14 May 2024 14:18:16 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Middlewares/RequRespLogMiddleware.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/EntrustSettle.Extensions/Middlewares/RequRespLogMiddleware.cs b/EntrustSettle.Extensions/Middlewares/RequRespLogMiddleware.cs index 94901a5..7c092f6 100644 --- a/EntrustSettle.Extensions/Middlewares/RequRespLogMiddleware.cs +++ b/EntrustSettle.Extensions/Middlewares/RequRespLogMiddleware.cs @@ -39,12 +39,18 @@ namespace EntrustSettle.Extensions.Middlewares } var path = context.Request.Path.ToString(); - if (path.Contains("index.html") || path.Contains("swagger.json")) + if (!path.Contains("/api")) { await _next(context); return; } + //if (path.Contains("index.html") || path.Contains("swagger.json")) + //{ + // await _next(context); + // return; + //} + // 判断如果请求或响应中含有文件上传,不记录日志 //if (context.Request.HasFormContentType && context.Request.Form.Files.Count > 0) //{