always use ipv4
This commit is contained in:
parent
598b60b1f0
commit
d496f3768d
@ -1,6 +1,8 @@
|
||||
use std::{
|
||||
collections::{BTreeSet, HashMap},
|
||||
net::IpAddr,
|
||||
ops::Deref,
|
||||
str::FromStr,
|
||||
sync::LazyLock,
|
||||
time::Instant,
|
||||
};
|
||||
@ -294,7 +296,12 @@ pub async fn autocomplete_with_engines(
|
||||
Ok(merge_autocomplete_responses(autocomplete_results))
|
||||
}
|
||||
|
||||
pub static CLIENT: LazyLock<reqwest::Client> = LazyLock::new(|| reqwest::Client::new());
|
||||
pub static CLIENT: LazyLock<reqwest::Client> = LazyLock::new(|| {
|
||||
reqwest::ClientBuilder::new()
|
||||
.local_address(IpAddr::from_str("0.0.0.0").unwrap())
|
||||
.build()
|
||||
.unwrap()
|
||||
});
|
||||
|
||||
pub async fn search(
|
||||
query: SearchQuery,
|
||||
|
Loading…
Reference in New Issue
Block a user