summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/celmatcher.go
diff options
context:
space:
mode:
authorFrancis Lavoie <lavofr@gmail.com>2023-02-08 12:49:17 -0500
committerGitHub <noreply@github.com>2023-02-08 17:49:17 +0000
commit90798f3eea6b7a219a9bb55f680919c0504263e3 (patch)
treea7ac2da2828e2739c01621103075924054f44105 /modules/caddyhttp/celmatcher.go
parent536c28d4dc4b048d710bd37903857f0de15ab3c5 (diff)
go.mod: Upgrade various dependencies (#5362)
* chore: Upgrade various dependencies * Support CEL file matcher with no args * Document `http.request.orig_uri.path.*`, reorder placeholders in docs --------- Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
Diffstat (limited to 'modules/caddyhttp/celmatcher.go')
-rw-r--r--modules/caddyhttp/celmatcher.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/celmatcher.go b/modules/caddyhttp/celmatcher.go
index 7f1cc02..60ca00b 100644
--- a/modules/caddyhttp/celmatcher.go
+++ b/modules/caddyhttp/celmatcher.go
@@ -124,7 +124,7 @@ func (m *MatchExpression) Provision(ctx caddy.Context) error {
// create the CEL environment
env, err := cel.NewEnv(
- cel.Function(placeholderFuncName, cel.SingletonBinaryImpl(m.caddyPlaceholderFunc), cel.Overload(
+ cel.Function(placeholderFuncName, cel.SingletonBinaryBinding(m.caddyPlaceholderFunc), cel.Overload(
placeholderFuncName+"_httpRequest_string",
[]*cel.Type{httpRequestObjectType, cel.StringType},
cel.AnyType,
@@ -345,7 +345,7 @@ func CELMatcherImpl(macroName, funcName string, matcherDataTypes []*cel.Type, fa
cel.Macros(macro),
cel.Function(funcName,
cel.Overload(funcName, append([]*cel.Type{requestType}, matcherDataTypes...), cel.BoolType),
- cel.SingletonBinaryImpl(CELMatcherRuntimeFunction(funcName, fac))),
+ cel.SingletonBinaryBinding(CELMatcherRuntimeFunction(funcName, fac))),
}
programOptions := []cel.ProgramOption{
cel.CustomDecorator(CELMatcherDecorator(funcName, fac)),