mirror of
https://github.com/neon-mmd/websurfx.git
synced 2024-11-21 13:38:21 -05:00
✨ feat: config option to timeout requests for fetching search results from the upstream search engines (#545)
This commit is contained in:
parent
4a990c537b
commit
2149e32c9e
@ -77,6 +77,7 @@ pub async fn aggregate(
|
||||
let client = CLIENT.get_or_init(|| {
|
||||
ClientBuilder::new()
|
||||
.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)
|
||||
.gzip(true)
|
||||
.brotli(true)
|
||||
|
Loading…
Reference in New Issue
Block a user