forked from ddrilling/AsbCloudServer
RequerstTrackerMiddleware. Add RequestLogDto.RequestContentLength
This commit is contained in:
parent
8c401dfa9c
commit
1489c60675
@ -61,5 +61,10 @@ namespace AsbCloudApp.Data
|
||||
/// стек вызовов
|
||||
/// </summary>
|
||||
public string? ExceptionStack { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Размер body
|
||||
/// </summary>
|
||||
public long? RequestContentLength { get; set; }
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.BouncyCastle.Asn1.Ocsp;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudWebApi.Middlewares
|
||||
@ -23,6 +24,7 @@ namespace AsbCloudWebApi.Middlewares
|
||||
UserIp = context.Connection?.RemoteIpAddress?.ToString(),
|
||||
RequestMethod = context.Request.Method,
|
||||
RequestPath = context.Request.Path.Value,
|
||||
RequestContentLength = context.Request.ContentLength,
|
||||
Referer = context.Request.Headers["Referer"].ToString(),
|
||||
};
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user