allow to turn off forced connection timeout

This commit is contained in:
Jun Kurihara 2024-02-01 18:07:41 +09:00
commit b2b3b05fcb
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
9 changed files with 41 additions and 19 deletions

View file

@ -43,7 +43,11 @@ pub struct ProxyConfig {
pub keepalive: bool, // when instantiate server
// experimentals
/// SNI consistency check
pub sni_consistency: bool, // Handler
/// Connection handling timeout
/// timeout to handle a connection, total time of receive request, serve, and send response. this might limits the max length of response.
pub connection_handling_timeout: Duration,
#[cfg(feature = "cache")]
pub cache_enabled: bool,
@ -90,6 +94,7 @@ impl Default for ProxyConfig {
keepalive: true,
sni_consistency: true,
connection_handling_timeout: Duration::from_secs(u64::MAX),
#[cfg(feature = "cache")]
cache_enabled: false,