Open NomadXD opened 3 years ago
I am trying to get the upstream host ip address from a WASM filter using getValue() method. I tried ,
getValue()
std::string remote_ip; auto buffer = getValue({"upstream", "address"}, &remote_ip); LOG_INFO("remote_ip >>>>>>>>>>>>>>>"+remote_ip);
but it's not working. It returns env.proxy_get_property return: 1 which I assume should be 0 if everything's correct. I had a look at this method https://github.com/envoyproxy/envoy/blob/c93d486c2d303dbf2cc9f88717de0bfd66e1afdb/source/extensions/common/wasm/context.cc#L490 from envoy source code and they have implemented it. Anything wrong with the way i'm using it ?
env.proxy_get_property return: 1
I am trying to get the upstream host ip address from a WASM filter using
getValue()
method. I tried ,but it's not working. It returns
env.proxy_get_property return: 1
which I assume should be 0 if everything's correct. I had a look at this method https://github.com/envoyproxy/envoy/blob/c93d486c2d303dbf2cc9f88717de0bfd66e1afdb/source/extensions/common/wasm/context.cc#L490 from envoy source code and they have implemented it. Anything wrong with the way i'm using it ?