mirror of
https://github.com/neon-mmd/websurfx.git
synced 2024-11-23 06:28:23 -05:00
Added new HTTP connection setting to the reqwest::ClientBuilder to timeout requests for fetching the search results from the upstream search engines.
This commit is contained in:
parent
4a990c537b
commit
4826394454
@ -77,6 +77,7 @@ pub async fn aggregate(
|
|||||||
let client = CLIENT.get_or_init(|| {
|
let client = CLIENT.get_or_init(|| {
|
||||||
ClientBuilder::new()
|
ClientBuilder::new()
|
||||||
.timeout(Duration::from_secs(config.request_timeout as u64)) // Add timeout to request to avoid DDOSing the server
|
.timeout(Duration::from_secs(config.request_timeout as u64)) // Add timeout to request to avoid DDOSing the server
|
||||||
|
.connect_timeout(Duration::from_secs(config.request_timeout as u64)) // Add timeout to request to avoid DDOSing the server
|
||||||
.https_only(true)
|
.https_only(true)
|
||||||
.gzip(true)
|
.gzip(true)
|
||||||
.brotli(true)
|
.brotli(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user