From d3d4a15bcd9a43f5a68709dd15e24b14bbdbeeff Mon Sep 17 00:00:00 2001 From: Mina Karam Date: Tue, 29 Sep 2026 17:16:30 +0300 Subject: [PATCH] fix(rum): send a User-Agent from the session replay asset proxy (#14935) Co-authored-by: Claude Opus 5.5 Co-authored-by: Hengfei Yang --- src/api/http/src/handler/http/router/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/api/http/src/handler/http/router/mod.rs b/src/api/http/src/handler/http/router/mod.rs index 014946e614..b309a5f2a4 100644 --- a/src/api/http/src/handler/http/router/mod.rs +++ b/src/api/http/src/handler/http/router/mod.rs @@ -548,7 +548,10 @@ pub async fn proxy(Path(params): Path) -> impl IntoResponse { { return (StatusCode::BAD_REQUEST, format!("URL blocked: {e}")).into_response(); } - let client = match common::utils::ssrf_guard::build_safe_client(reqwest::Client::builder()) { + // Session replay loads the recorded page's fonts and images through here. Without a + // User-Agent, CDN firewalls such as the AWS managed `NoUserAgent_HEADER` rule answer 403. + let builder = reqwest::Client::builder().user_agent("OpenObserve"); + let client = match common::utils::ssrf_guard::build_safe_client(builder) { Ok(c) => c, Err(e) => { return (