将WAF模板中的cc修改为cc2

This commit is contained in:
刘祥超
2021-07-19 11:01:38 +08:00
parent 7e37fc3b80
commit 9bd38094c3
2 changed files with 5 additions and 6 deletions

View File

@@ -367,7 +367,7 @@ func Template() *WAF {
group.IsInbound = true
group.Name = "CC攻击"
group.Description = "Challenge Collapsar防止短时间大量请求涌入请谨慎开启和设置"
group.Code = "cc"
group.Code = "cc2"
{
set := NewRuleSet()
@@ -378,11 +378,13 @@ func Template() *WAF {
set.Connector = RuleConnectorAnd
set.AddAction(ActionBlock, nil)
set.AddRule(&Rule{
Param: "${cc.requests}",
Param: "${cc2}",
Operator: RuleOperatorGt,
Value: "1000",
CheckpointOptions: map[string]interface{}{
"period": "60",
"period": "60",
"threshold": 1000,
"keys": []string{"${remoteAddr}", "${requestPath}"},
},
IsCaseInsensitive: false,
})