Set user-agent (#2230)

Use the same well-defined value in all cases when sending user-agent
header
This commit is contained in:
pakrym-oai
2025-08-12 09:40:04 -07:00
committed by GitHub
parent e8670ad840
commit cb78f2333e
7 changed files with 59 additions and 9 deletions

View File

@@ -67,13 +67,7 @@ async fn check_for_update(version_file: &Path) -> anyhow::Result<()> {
tag_name: latest_tag_name,
} = reqwest::Client::new()
.get(LATEST_RELEASE_URL)
.header(
"User-Agent",
format!(
"codex/{} (+https://github.com/openai/codex)",
env!("CARGO_PKG_VERSION")
),
)
.header("User-Agent", get_codex_user_agent(None))
.send()
.await?
.error_for_status()?