diff --git a/src/data/cel.rs b/src/data/cel.rs
index 1e65797..092f888 100644
--- a/src/data/cel.rs
+++ b/src/data/cel.rs
@@ -1,9 +1,11 @@
use crate::data::get_attribute;
use crate::data::property::{host_get_map, Path};
+use cel_interpreter::extractors::This;
use cel_interpreter::objects::{Map, ValueType};
-use cel_interpreter::{Context, Value};
+use cel_interpreter::{Context, ExecutionError, ResolveResult, Value};
use cel_parser::{parse, Expression as CelExpression, Member, ParseError};
use chrono::{DateTime, FixedOffset};
+use proxy_wasm::types::{Bytes, Status};
use serde_json::Value as JsonValue;
use std::collections::HashMap;
use std::fmt::{Debug, Formatter};
@@ -45,6 +47,8 @@ impl Expression {
let mut ctx = Context::default();
let Map { map } = self.build_data_map();
+ ctx.add_function("getHostProperty", get_host_property);
+
// if expression was "auth.identity.anonymous",
// {
// "auth": { "identity": { "anonymous": true } }
@@ -63,6 +67,42 @@ impl Expression {
}
}
+#[cfg(test)]
+pub fn inner_host_get_property(path: Vec<&str>) -> Result