feat(config): option to keep the websurfx server connection alive for a certain period for subsequent requests (#568)

This commit is contained in:
ddotthomas 2024-05-09 11:24:12 -06:00 committed by GitHub
parent 408858a91e
commit 5d06cce220
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 5 deletions

View file

@ -81,7 +81,7 @@ pub async fn aggregate(
.pool_idle_timeout(Duration::from_secs(
config.pool_idle_connection_timeout as u64,
))
.tcp_keepalive(Duration::from_secs(config.tcp_connection_keepalive as u64))
.tcp_keepalive(Duration::from_secs(config.tcp_connection_keep_alive as u64))
.connect_timeout(Duration::from_secs(config.request_timeout as u64)) // Add timeout to request to avoid DDOSing the server
.https_only(true)
.gzip(true)