Skip to content

Commit

Permalink
clear headers sent to operator
Browse files Browse the repository at this point in the history
  • Loading branch information
aviramha committed May 29, 2024
1 parent 9a6541f commit 857dd47
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions mirrord/operator/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,16 +514,27 @@ impl OperatorApi {
.uri(self.connect_url(&session_info))
.header("x-session-id", session_info.metadata.session_id.to_string());

debug!(
"session_id {}",
session_info.metadata.session_id.to_string()
);
if let Some(name) = name {
builder = builder.header("x-client-name", name);
debug!(?name, "name");
builder =
builder.header("x-client-name", name.replace(|c: char| !c.is_ascii(), ""));
};

if let Some(hostname) = hostname {
builder = builder.header("x-client-hostname", hostname);
debug!(?hostname, "hostname");
builder = builder.header(
"x-client-hostname",
hostname.replace(|c: char| !c.is_ascii(), ""),
);
};

match session_info.metadata.client_credentials() {
Ok(Some(credentials)) => {
debug!(?credentials, "credentials");
builder = builder.header("x-client-der", credentials);
}
Ok(None) => {}
Expand Down

0 comments on commit 857dd47

Please sign in to comment.