Skip to content

Commit

Permalink
修复文件上传会记录到接口日志问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Coldairarrow committed Mar 27, 2020
1 parent 8dedce1 commit 959f48f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public void OnActionExecuted(ActionExecutedContext filterContext)
_requesTime.TryRemove(HttpContextCore.Current, out _);

var request = filterContext.HttpContext.Request;
string contentType = request.ContentType ?? string.Empty;
if (!contentType.Contains("json"))
return;
string resContent = string.Empty;
if (filterContext.Result is ContentResult result)
resContent = result.Content;
Expand Down

0 comments on commit 959f48f

Please sign in to comment.