Add request filter for intercept

This commit is contained in:
David Stotijn
2022-03-15 19:32:29 +01:00
parent d051d48941
commit f4074a8060
18 changed files with 500 additions and 69 deletions

View File

@ -3,7 +3,6 @@ package sender
import (
"errors"
"fmt"
"regexp"
"strings"
"github.com/oklog/ulid"
@ -93,7 +92,7 @@ func (req Request) matchInfixExpr(expr search.InfixExpression) (bool, error) {
leftVal := req.getMappedStringLiteral(left.Value)
if expr.Operator == search.TokOpRe || expr.Operator == search.TokOpNotRe {
right, ok := expr.Right.(*regexp.Regexp)
right, ok := expr.Right.(search.RegexpLiteral)
if !ok {
return false, errors.New("right operand must be a regular expression")
}