feat:日志记录新增用户名从前端获取
This commit is contained in:
parent
7cfa543865
commit
00d3e5ab78
@ -73,7 +73,7 @@ namespace ZR.Admin.WebApi.Filters
|
|||||||
{
|
{
|
||||||
string method = context.HttpContext.Request.Method.ToUpper();
|
string method = context.HttpContext.Request.Method.ToUpper();
|
||||||
// 获取当前的用户
|
// 获取当前的用户
|
||||||
string userName = context.HttpContext.GetName();
|
string userName = context.HttpContext.GetName() ?? context.HttpContext.Request.Headers["userName"];
|
||||||
string jsonResult = string.Empty;
|
string jsonResult = string.Empty;
|
||||||
if (context.Result is ContentResult result && result.ContentType == "application/json")
|
if (context.Result is ContentResult result && result.ContentType == "application/json")
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user