Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions crates/openshell-sandbox/src/l7/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,14 @@ where
"HTTP_REQUEST",
);

// Forward request with credential rewriting.
let keep_alive =
// Forward request with credential rewriting and relay the response.
// relay_http_request_with_resolver handles both directions: it sends
// the request upstream and reads the response back to the client.
let reusable =
crate::l7::rest::relay_http_request_with_resolver(&req, client, upstream, resolver)
.await?;

// Relay response back to client.
let reusable =
crate::l7::rest::relay_response_to_client(upstream, client, &req.action).await?;

if !keep_alive || !reusable {
if !reusable {
break;
}
}
Expand Down
Loading