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

This commit is contained in:
GoEdgeLab
2021-12-01 17:43:08 +08:00
parent 0b3ef14640
commit 28958b379d
8 changed files with 34 additions and 43 deletions

View File

@@ -29,6 +29,9 @@ type Request interface {
// WAFClose 关闭当前请求所在的连接
WAFClose()
// WAFOnAction 动作回调
WAFOnAction(action interface{}) (goNext bool)
// Format 格式化变量
Format(string) string
}

View File

@@ -73,3 +73,7 @@ func (this *TestRequest) WAFClose() {
func (this *TestRequest) Format(s string) string {
return s
}
func (this *TestRequest) WAFOnAction(action interface{}) bool {
return true
}