国家、省份数据不再每个小时更新一次;WAF增加国家/地区、省份、城市、ISP等参数

This commit is contained in:
GoEdgeLab
2022-01-06 16:27:39 +08:00
parent da03455d10
commit 18c20deee5
16 changed files with 583 additions and 20 deletions

View File

@@ -62,7 +62,7 @@ func NewWAFFromFile(path string) (waf *WAF, err error) {
return waf, nil
}
func (this *WAF) Init() error {
func (this *WAF) Init() (resultErrors []error) {
// checkpoint
this.checkpointsMap = map[string]checkpoints.CheckpointInterface{}
for _, def := range checkpoints.AllCheckpoints {
@@ -86,7 +86,8 @@ func (this *WAF) Init() error {
err := group.Init(this)
if err != nil {
return err
// 这里我们不阻止其他规则正常加入
resultErrors = append(resultErrors, err)
}
}
}
@@ -102,7 +103,8 @@ func (this *WAF) Init() error {
err := group.Init(this)
if err != nil {
return err
// 这里我们不阻止其他规则正常加入
resultErrors = append(resultErrors, err)
}
}
}