|
@@ -52,6 +52,7 @@ var apiFieldMappings = map[string]map[string]FieldPathConfig{
|
|
|
"AllowAndDenyIps": {Paths: []string{"ip", "ips", "data.ip", "data.ips"}, FieldType: "array_string"},
|
|
|
"RuleID": {Paths: []string{"ruleId", "data.ruleId", "ids", "data.ids"}, FieldType: "array_int"},
|
|
|
"Comment": {Paths: []string{"comment", "data.comment", "desc"}},
|
|
|
+ "AllowOrDeny" : {Paths: []string{"allowOrDeny"}, FieldType: "int"},
|
|
|
},
|
|
|
"CC": {
|
|
|
"AllowAndDenyIps": {Paths: []string{"ips","newIp", "data.newIp","data.ips", "ip", "data.ip" }},
|
|
@@ -197,7 +198,10 @@ func (s *wafLogDataCleanService) extractField(jsonStr, fieldName string, config
|
|
|
} else {
|
|
|
cleaned.AllowAndDenyIps = validPathResult.String()
|
|
|
}
|
|
|
+ case "AllowOrDeny":
|
|
|
+ cleaned.AllowOrDeny = int(validPathResult.Int())
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// FormatBackendList 格式化后端地址列表(已简化)
|