Skip to content

Commit

Permalink
fix(http sink): cert verification with proxy enabled (#13759)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntim authored and jdrouet committed Aug 22, 2022
1 parent 60035fe commit 54569c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,15 @@ pub fn build_proxy_connector(
tls_settings: MaybeTlsSettings,
proxy_config: &ProxyConfig,
) -> Result<ProxyConnector<HttpsConnector<HttpConnector>>, HttpError> {
// Create dedicated TLS connector for the proxied connection with user TLS settings.
let tls = tls_connector_builder(&tls_settings)
.context(BuildTlsConnectorSnafu)?
.build();
let https = build_tls_connector(tls_settings)?;
let mut proxy = ProxyConnector::new(https).unwrap();
// Make proxy connector aware of user TLS settings by setting the TLS connector:
// https://github.com/vectordotdev/vector/issues/13683
proxy.set_tls(Some(tls));
proxy_config
.configure(&mut proxy)
.context(MakeProxyConnectorSnafu)?;
Expand Down

0 comments on commit 54569c8

Please sign in to comment.