mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-01-01 19:16:35 +08:00
[WAF]规则中增加请求Header长度限制和响应Header长度限制
This commit is contained in:
@@ -186,6 +186,12 @@ func (this *Rule) MatchRequest(req *requests.Request) (b bool, err error) {
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
// if is composed checkpoint, we just returns true or false
|
||||
if this.singleCheckpoint.IsComposed() {
|
||||
return types.Bool(value), nil
|
||||
}
|
||||
|
||||
return this.Test(value), nil
|
||||
}
|
||||
|
||||
@@ -235,6 +241,12 @@ func (this *Rule) MatchResponse(req *requests.Request, resp *requests.Response)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
// if is composed checkpoint, we just returns true or false
|
||||
if this.singleCheckpoint.IsComposed() {
|
||||
return types.Bool(value), nil
|
||||
}
|
||||
|
||||
return this.Test(value), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user