Commit 43717d05 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

Add AttackListener filter to ListAttackLogs method for enhanced query capabilities

This update introduces a new filter for AttackListener in the ListAttackLogs method, allowing for more precise querying of attack logs based on the specified listener. This change improves the flexibility and usability of the WAF service's logging functionality.
parent 1c461f5a
......@@ -954,6 +954,9 @@ func (s *wafService) ListAttackLogs(ctx context.Context, req *AttackLogFilter) (
if req.AttackApp != "" {
boolQuery.Filter(elastic.NewMatchPhraseQuery("res_name", req.AttackApp).Slop(0))
}
if req.AttackListener != "" {
boolQuery.Filter(elastic.NewMatchPhraseQuery("res_name", req.AttackListener).Slop(0))
}
if req.AttackType != "" {
attackTypes := strings.Split(req.AttackType, ",")
var terms []any
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment