Skip to content

Commit

Permalink
Merge pull request bottlerocket-os#3667 from etungsten/huhcat
Browse files Browse the repository at this point in the history
pluto: remove unnecessary auth header in hyper-proxy
  • Loading branch information
etungsten authored Dec 8, 2023
2 parents 1ebf2df + 8e4869d commit a7be9c3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sources/api/pluto/src/hyper_proxy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,12 @@ impl Proxy {

/// Set `Proxy` authorization
pub fn set_authorization<C: Credentials + Clone>(&mut self, credentials: Authorization<C>) {
// In pluto, we use custom intercept for HTTPS traffic we might proxy based on the no proxy specification.
match self.intercept {
Intercept::Https => {
self.headers.typed_insert(ProxyAuthorization(credentials.0));
}
_ => {
self.headers
.typed_insert(Authorization(credentials.0.clone()));
Intercept::Custom(_) | Intercept::Https => {
self.headers.typed_insert(ProxyAuthorization(credentials.0));
}
_ => {}
}
}
}
Expand Down

0 comments on commit a7be9c3

Please sign in to comment.