using static ZhiYi.Core.Api.ServerConfig.KestrelOptions.Endpoint;
namespace ZhiYi.Core.Api.ServerConfig
{
public class KestrelOptions
{
///
/// Gets or sets the endpoints for the Kestrel server.
///
public IDictionary Endpoints { get; init; } = new Dictionary();
///
/// 文件大小限制配置
///
public KestrelLimitsOptions Limits { get; set; }
///
/// Represents an endpoint for the Kestrel server.
///
public class Endpoint
{
private const string DefaultProtocols = "Http1AndHttp2";
///
/// The URL associated with the endpoint.
///
public string Url { get; set; } = string.Empty;
///
/// The protocols associated with the endpoint. Defaults to "Http1AndHttp2" if not specified.
///
public string Protocols { get; set; } = DefaultProtocols;
///
/// Initializes a new instance of the class.
///
public Endpoint()
{
}
public class KestrelLimitsOptions
{
public long MaxRequestBodySize { get; set; }
}
}
}
}