using Newtonsoft.Json; namespace Shared.Models.AppConf { public class WafConf { public bool enable { get; set; } public bool bypassLocalIP { get; set; } public bool allowExternalIpAccess { get; set; } public bool bruteForceProtection { get; set; } public List whiteIps { get; set; } public int limit_req { get; set; } /// /// uri_pattern: WafLimitMap /// [JsonProperty("limit_map", ObjectCreationHandling = ObjectCreationHandling.Replace, NullValueHandling = NullValueHandling.Ignore)] public Dictionary limit_map { get; set; } public List ipsDeny { get; set; } public List ipsAllow { get; set; } public List countryDeny { get; set; } public List countryAllow { get; set; } public List asnsDeny { get; set; } public List asnDeny { get; set; } public List asnAllow { get; set; } /// /// header_key: regex /// [JsonProperty("headersDeny", ObjectCreationHandling = ObjectCreationHandling.Replace, NullValueHandling = NullValueHandling.Ignore)] public Dictionary headersDeny { get; set; } } public class WafLimitMap { public int limit { get; set; } public int second { get; set; } public bool pathId { get; set; } public string[] queryIds { get; set; } } public class WafAsnRange { public long start { get; set; } public long end { get; set; } } }