WAF增加多个动作

This commit is contained in:
刘祥超
2021-07-18 15:51:49 +08:00
parent 0486f86898
commit d775dfeeaa
98 changed files with 1999 additions and 903 deletions

View File

@@ -183,7 +183,7 @@ func (this *Rule) Init() error {
return err
}
func (this *Rule) MatchRequest(req *requests.Request) (b bool, err error) {
func (this *Rule) MatchRequest(req requests.Request) (b bool, err error) {
if this.singleCheckpoint != nil {
value, err, _ := this.singleCheckpoint.RequestValue(req, this.singleParam, this.CheckpointOptions)
if err != nil {
@@ -233,7 +233,7 @@ func (this *Rule) MatchRequest(req *requests.Request) (b bool, err error) {
return this.Test(value), nil
}
func (this *Rule) MatchResponse(req *requests.Request, resp *requests.Response) (b bool, err error) {
func (this *Rule) MatchResponse(req requests.Request, resp *requests.Response) (b bool, err error) {
if this.singleCheckpoint != nil {
// if is request param
if this.singleCheckpoint.IsRequest() {