func (m MatchExpression) caddyPlaceholderFunc(lhs, rhs ref.Val) ref.Val {
	celReq, ok := lhs.(celHTTPRequest)
	if !ok {
		return types.NewErr(
			"invalid request of type '%v' to "+placeholderFuncName+"(request, placeholderVarName)",
			lhs.Type(),
		)
	}
	phStr, ok := rhs.(types.String)
	if !ok {
		return types.NewErr(
			"invalid placeholder variable name of type '%v' to "+placeholderFuncName+"(request, placeholderVarName)",
			rhs.Type(),
		)
	}

	repl := celReq.Context().Value(caddy.ReplacerCtxKey).(*caddy.Replacer)
	val, _ := repl.Get(string(phStr))

	return m.ta.NativeToValue(val)
}
// caddyPlaceholderFunc implements the custom CEL function that accesses the
// Replacer on a request and gets values from it.
caddyPlaceholderFunc implements the custom CEL function that accesses the
Replacer on a request and gets values from it.
// caddyPlaceholderFunc implements the custom CEL function that accesses the // Replacer on a request and gets values from it .
func (m MatchExpression) caddyPlaceholderFunc(lhs, rhs ref.Val) ref.Val {
	celReq, ok := lhs.(celHTTPRequest)
	if !ok {
		return types.NewErr(
			"invalid request of type '%v' to "+placeholderFuncName+"(request, placeholderVarName)",
			lhs.Type(),
		)
	}
	phStr, ok := rhs.(types.String)
	if !ok {
		return types.NewErr(
			"invalid placeholder variable name of type '%v' to "+placeholderFuncName+"(request, placeholderVarName)",
			rhs.Type(),
		)
	}
	repl := celReq.Context().Value(caddy.ReplacerCtxKey).(*caddy.Replacer)
	val, _ := repl.Get(string(phStr))
	return m.ta.NativeToValue(val)
}
func ( m MatchExpression ) caddyPlaceholderFunc ( lhs , rhs ref . Val ) ref . Val { celReq , ok := lhs . ( celHTTPRequest ) if ! ok { return types . NewErr ( " " + placeholderFuncName + " " , lhs . Type ( ) , ) } phStr , ok := rhs . ( types . String ) if ! ok { return types . NewErr ( " " + placeholderFuncName + " " , rhs . Type ( ) , ) } repl := celReq . Context ( ) . Value ( caddy . ReplacerCtxKey ) . ( * caddy . Replacer ) val , _ := repl . Get ( string ( phStr ) ) return m . ta . NativeToValue ( val ) }
caddyPlaceholderFunc implements the custom CEL function that accesses the
Replacer on a request and gets values from it.
caddyPlaceholderFunc implements the custom CEL function that accesses the Replacer on a request and gets values from it .