Skip to content

Commit

Permalink
fix: Add request query of HTTP url as a separate header
Browse files Browse the repository at this point in the history
Signed-off-by: Anurag Singh Rajawat <[email protected]>
  • Loading branch information
anurag-rajawat committed Jan 13, 2025
1 parent 1aaef73 commit 3d6d6ed
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions filter/envoy/envoy-wasm-filters/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,22 @@ 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(),
);
headers.insert(
":path".to_string(),
String::from_utf8(
self.get_property(vec!["request", "url_path"])
.unwrap_or_default(),
)
.unwrap_or_default(),
);

self.api_event.metadata.timestamp = self
.get_current_time()
Expand Down

0 comments on commit 3d6d6ed

Please sign in to comment.