From 680505f21ad0c809f007773517dd444b211f4c99 Mon Sep 17 00:00:00 2001 From: BallaNitesh <126162378+BallaNitesh@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:36:06 +0530 Subject: [PATCH] fix: remove x-request-id from headers before connector calls (#2182) --- crates/router/src/services/api.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/crates/router/src/services/api.rs b/crates/router/src/services/api.rs index dc25d567864f..b10feebe16f4 100644 --- a/crates/router/src/services/api.rs +++ b/crates/router/src/services/api.rs @@ -453,17 +453,7 @@ pub async fn send_request( request.certificate_key, )?; - let mut headers_with_request_id = request.headers; - headers_with_request_id.insert(( - crate::headers::X_REQUEST_ID.to_string(), - state - .api_client - .get_request_id() - .ok_or(errors::ApiClientError::InternalServerErrorReceived) - .into_report()? - .into(), - )); - let headers = headers_with_request_id.construct_header_map()?; + let headers = request.headers.construct_header_map()?; let metrics_tag = router_env::opentelemetry::KeyValue { key: consts::METRICS_HOST_TAG_NAME.into(), value: url.host_str().unwrap_or_default().to_string().into(),