From 6fe53197766ecd06b35da95bc30dcc91a1b5a5f0 Mon Sep 17 00:00:00 2001 From: Anurag Singh Rajawat Date: Fri, 10 Jan 2025 17:15:32 +0530 Subject: [PATCH] fix: Add request query of HTTP url as a separate header Signed-off-by: Anurag Singh Rajawat --- filter/envoy/envoy-wasm-filters/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/filter/envoy/envoy-wasm-filters/src/lib.rs b/filter/envoy/envoy-wasm-filters/src/lib.rs index f4df5a6..122cf36 100644 --- a/filter/envoy/envoy-wasm-filters/src/lib.rs +++ b/filter/envoy/envoy-wasm-filters/src/lib.rs @@ -120,6 +120,14 @@ impl HttpContext for Plugin { headers.insert(header.0, header.1); } } + headers.insert( + "query".to_string(), + String::from_utf8( + self.get_property(vec!["request", "query"]) + .unwrap_or_default(), + ) + .unwrap_or_default(), + ); self.api_event.metadata.timestamp = self .get_current_time()