修复WAF OnAction在并发时无法准确调用请求动作的Bug

This commit is contained in:
刘祥超
2021-12-01 17:43:08 +08:00
parent 6aacf49764
commit 0f0776fc1a
8 changed files with 34 additions and 43 deletions

View File

@@ -27,7 +27,6 @@ type WAF struct {
hasInboundRules bool
hasOutboundRules bool
onActionCallback func(action ActionInterface) (goNext bool)
checkpointsMap map[string]checkpoints.CheckpointInterface // prefix => checkpoint
}
@@ -347,10 +346,6 @@ func (this *WAF) CountOutboundRuleSets() int {
return count
}
func (this *WAF) OnAction(onActionCallback func(action ActionInterface) (goNext bool)) {
this.onActionCallback = onActionCallback
}
func (this *WAF) FindCheckpointInstance(prefix string) checkpoints.CheckpointInterface {
instance, ok := this.checkpointsMap[prefix]
if ok {