Skip to content

Commit 6541591

Browse files
committed
fix(sandbox): add missing query field in forward proxy L7 request info
1 parent e73a56a commit 6541591

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/openshell-sandbox/src/proxy.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1838,9 +1838,14 @@ async fn handle_forward_proxy(
18381838
secret_resolver: secret_resolver.clone(),
18391839
};
18401840

1841+
let (target_path, query_string) = match path.split_once('?') {
1842+
Some((p, q)) => (p.to_string(), q.to_string()),
1843+
None => (path.clone(), String::new()),
1844+
};
18411845
let request_info = crate::l7::L7RequestInfo {
18421846
action: method.to_string(),
1843-
target: path.clone(),
1847+
target: target_path,
1848+
query: query_string,
18441849
};
18451850

18461851
let (allowed, reason) =

0 commit comments

Comments
 (0)