Skip to content
Open
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
5 changes: 3 additions & 2 deletions src/serve/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl ProxyBuilder {
} else {
let no_sys_proxy = opts.no_system_proxy;
let insecure = opts.insecure;
let client = self.clients.get_client(opts)?;
let client = self.clients.get_client(opts.clone())?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you'd pull the tracing statement above this line, you wouldn't need to clone.

let handler = ProxyHandlerHttp::new(
proto,
client,
Expand Down Expand Up @@ -91,6 +91,7 @@ impl ProxyBuilder {
Default::default()
}
);
tracing::debug!("Proxy options: {:?}", opts); // Optional debug log
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd appreciate the comment to be removed, as it's obvious:

Suggested change
tracing::debug!("Proxy options: {:?}", opts); // Optional debug log
tracing::debug!("Proxy options: {opts:#?}");

self.router = handler.register(self.router);
Ok(self)
}
Expand All @@ -101,7 +102,7 @@ impl ProxyBuilder {
}
}

#[derive(Clone, Eq, PartialEq, Hash)]
#[derive(Clone, Eq, PartialEq, Hash, Debug)]
pub(crate) struct ProxyClientOptions {
pub insecure: bool,
pub no_system_proxy: bool,
Expand Down