修复 API日志未能读取 httpRequest的内容问题
This commit is contained in:
parent
7025590d3b
commit
18e60d4a9b
|
|
@ -158,6 +158,7 @@ namespace Learn.VideoAnalysis.API.Expand
|
|||
var logId = Yitter.IdGenerator.YitIdHelper.NextId();
|
||||
if (!context.Request.Method.Equals("GET", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
context.Request.EnableBuffering();
|
||||
//记录请求参数
|
||||
if (context.Request.Body.CanSeek)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ namespace Learn.VideoAnalysis.API
|
|||
options.Filters.Add<HttpLogAttribute>();
|
||||
}).AddJsonOptions(options =>
|
||||
{
|
||||
|
||||
options.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All);//中文转换时不使用Unicode
|
||||
//options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;// 默认小驼峰 null 大驼峰
|
||||
});
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace VideoAnalysisCore.Model
|
|||
/// <summary>
|
||||
/// 授权信息
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true, Length = 500)]
|
||||
[SugarColumn(IsNullable = true, Length = 1000)]
|
||||
public string? Authorization { get; set; }
|
||||
/// <summary>
|
||||
/// 异常完整信息
|
||||
|
|
|
|||
Loading…
Reference in New Issue