mirror of
https://github.com/astro/buzzrelay.git
synced 2024-11-27 22:31:01 +00:00
main: add hostname to user-agent req header
This commit is contained in:
parent
7f91afa35e
commit
02680ffdac
1 changed files with 3 additions and 2 deletions
|
@ -344,10 +344,11 @@ async fn main() {
|
||||||
}
|
}
|
||||||
let client = reqwest::Client::builder()
|
let client = reqwest::Client::builder()
|
||||||
.timeout(Duration::from_secs(5))
|
.timeout(Duration::from_secs(5))
|
||||||
.user_agent(concat!(
|
.user_agent(format!(
|
||||||
|
"{}/{} (+https://{})",
|
||||||
env!("CARGO_PKG_NAME"),
|
env!("CARGO_PKG_NAME"),
|
||||||
"/",
|
|
||||||
env!("CARGO_PKG_VERSION"),
|
env!("CARGO_PKG_VERSION"),
|
||||||
|
config.hostname,
|
||||||
))
|
))
|
||||||
.pool_max_idle_per_host(1)
|
.pool_max_idle_per_host(1)
|
||||||
.pool_idle_timeout(Some(Duration::from_secs(5)))
|
.pool_idle_timeout(Some(Duration::from_secs(5)))
|
||||||
|
|
Loading…
Reference in a new issue