Send User-Agent header in outbound requests

This commit is contained in:
Lambda 2025-05-29 19:49:44 +00:00
parent d425ba72f8
commit c965c9747b
2 changed files with 4 additions and 1 deletions

View file

@ -653,7 +653,8 @@ fn reqwest_client_builder(config: &Config) -> Result<reqwest::ClientBuilder> {
let mut reqwest_client_builder = reqwest::Client::builder()
.pool_max_idle_per_host(0)
.connect_timeout(Duration::from_secs(30))
.timeout(Duration::from_secs(60 * 3));
.timeout(Duration::from_secs(60 * 3))
.user_agent(format!("{}/{}", env!("CARGO_PKG_NAME"), crate::version()));
if let Some(proxy) = config.proxy.to_proxy()? {
reqwest_client_builder = reqwest_client_builder.proxy(proxy);