[新增] 添加自动 IP 组规则测试功能,支持在保存前验证 Expr 规则命中情况

This commit is contained in:
ryan
2026-06-01 09:50:43 +08:00
parent 73beedfc09
commit b827baf19f
11 changed files with 287 additions and 26 deletions
@@ -4,6 +4,8 @@ import type {
WAFRuleGroup,
WAFRuleGroupPayload,
WAFIPGroup,
WAFIPGroupAutoTestPayload,
WAFIPGroupAutoTestResult,
WAFIPGroupPayload,
WAFIPGroupSyncResult,
WAFSiteRuleGroups,
@@ -84,3 +86,10 @@ export function syncWAFIPGroup(id: number) {
method: 'POST',
});
}
export function testWAFIPGroupAutoConfig(payload: WAFIPGroupAutoTestPayload) {
return apiRequest<WAFIPGroupAutoTestResult>('/waf/ip-groups/test', {
method: 'POST',
body: JSON.stringify(payload),
});
}