You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.0 KiB

namespace CoreAgent.Infrastructure.Options
{
public class RequestLoggingOptions
{
/// <summary>
/// 是否记录请求体
/// </summary>
public bool LogRequestBody { get; set; } = true;
/// <summary>
/// 是否记录响应体
/// </summary>
public bool LogResponseBody { get; set; } = true;
/// <summary>
/// 最大请求体大小(字节)
/// </summary>
public int MaxRequestBodySize { get; set; } = 1024 * 1024; // 1MB
/// <summary>
/// 最大响应体大小(字节)
/// </summary>
public int MaxResponseBodySize { get; set; } = 1024 * 1024; // 1MB
/// <summary>
/// 要排除的路径列表
/// </summary>
public string[] ExcludePaths { get; set; } = Array.Empty<string>();
/// <summary>
/// 要排除的HTTP方法列表
/// </summary>
public string[] ExcludeMethods { get; set; } = Array.Empty<string>();
}
}