File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -230,12 +230,16 @@ async fn main() -> Result<()> {
230230 let version_without_next = EXTENSION_VERSION . split ( '-' ) . next ( ) . unwrap_or ( "NA" ) ;
231231 debug ! ( "Starting Datadog Extension {version_without_next}" ) ;
232232 prepare_client_provider ( ) ?;
233- let client = Client :: builder ( ) . no_proxy ( ) . build ( ) . map_err ( |e| {
234- Error :: new (
235- std:: io:: ErrorKind :: InvalidData ,
236- format ! ( "Failed to create client: {e:?}" ) ,
237- )
238- } ) ?;
233+ let client = Client :: builder ( )
234+ . use_rustls_tls ( )
235+ . no_proxy ( )
236+ . build ( )
237+ . map_err ( |e| {
238+ Error :: new (
239+ std:: io:: ErrorKind :: InvalidData ,
240+ format ! ( "Failed to create client: {e:?}" ) ,
241+ )
242+ } ) ?;
239243
240244 let r = register ( & client)
241245 . await
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ pub fn get_client(config: Arc<config::Config>) -> reqwest::Client {
1717
1818fn build_client ( config : Arc < config:: Config > ) -> Result < reqwest:: Client , reqwest:: Error > {
1919 let client = reqwest:: Client :: builder ( )
20+ . use_rustls_tls ( )
2021 . timeout ( Duration :: from_secs ( config. flush_timeout ) )
2122 // Temporarily not force http2
2223 // Enable HTTP/2 for better multiplexing
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ impl TelemetryApiClient {
2020 pub async fn subscribe ( & self ) -> Result < Response , Box < dyn Error > > {
2121 let url = base_url ( TELEMETRY_SUBSCRIPTION_ROUTE ) ?;
2222 let resp = reqwest:: Client :: builder ( )
23+ . use_rustls_tls ( )
2324 . no_proxy ( )
2425 . build ( )
2526 . map_err ( |e| {
You can’t perform that action at this time.
0 commit comments