1
huangxiaoqiang
2026-02-25 02a4fdd78cef9c7d2a26bfb9aa187179cf0baac3
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Middlewares/ApiLogMiddleware.cs
@@ -41,6 +41,9 @@
                string responseParam = string.Empty;
                try
                {
                    string? apiIgnore = AppSettings.GetValue("ApiLogIgnore")?.ToString();
                    string[] ignoreUrls = !string.IsNullOrEmpty(apiIgnore) ? apiIgnore.Split(",") : new string[] { "get" };
                    (context.RequestServices.GetService(typeof(RequestLogModel)) as RequestLogModel).RequestDate = DateTime.Now;
                    try
                    {
@@ -63,8 +66,11 @@
                    ms.Position = 0;
                    await ms.CopyToAsync(originalBody);
                    if (!(context.Request.Path.Value?.Contains("Get") ?? false))
                    if (!ignoreUrls.Any(x => context.Request.Path.Value?.ToLower().Contains(x.ToLower()) ?? false))
                    {
                        Logger.Add(requestParam, responseParam);
                    }
                }
                catch (Exception ex)
                {