pub struct ProxyConfig {Show 18 fields
pub upstreams: Vec<UpstreamConfig>,
pub lb: LbPolicy,
pub lb_header: Option<String>,
pub lb_cookie: Option<String>,
pub health_check: Option<HealthCheckConfig>,
pub passive_health: Option<PassiveHealthConfig>,
pub headers_up: HashMap<String, String>,
pub headers_down: HashMap<String, String>,
pub retries: u32,
pub dynamic_upstreams: Option<DnsUpstreamConfig>,
pub error_pages: HashMap<u16, String>,
pub headers_up_replace: Vec<(String, String, String)>,
pub tls_skip_verify: bool,
pub upstream_http2: bool,
pub max_connections: Option<usize>,
pub keepalive_timeout: Option<Duration>,
pub sanitize_uri: bool,
pub srv_upstream: Option<SrvUpstreamConfig>,
}Expand description
Reverse proxy handler config.
Fields§
§upstreams: Vec<UpstreamConfig>§lb: LbPolicy§lb_header: Option<String>Header name used by HeaderHash load balancing.
Cookie name used by CookieHash load balancing.
health_check: Option<HealthCheckConfig>§passive_health: Option<PassiveHealthConfig>§headers_up: HashMap<String, String>§headers_down: HashMap<String, String>§retries: u32Number of retry attempts on upstream failure (0 = no retries).
dynamic_upstreams: Option<DnsUpstreamConfig>Optional DNS-based dynamic upstream resolution.
error_pages: HashMap<u16, String>Custom response bodies to substitute when upstream returns these status codes. Maps HTTP status code to the response body string.
headers_up_replace: Vec<(String, String, String)>Regex-based header replacement rules applied to upstream request headers.
Each entry is (header_name, pattern, replacement).
tls_skip_verify: boolWhen true, skip TLS certificate verification for HTTPS upstreams.
upstream_http2: boolWhen true, use HTTP/2 exclusively when communicating with upstreams.
max_connections: Option<usize>Maximum total concurrent connections to upstreams. Returns 503 when exceeded.
keepalive_timeout: Option<Duration>Idle keepalive timeout for upstream connections.
sanitize_uri: boolWhen true (default), normalize the URI path before forwarding by
collapsing consecutive slashes and resolving . / .. segments.
Set to false to forward the URI exactly as received.
srv_upstream: Option<SrvUpstreamConfig>Optional SRV-record-based dynamic upstream resolution.
Trait Implementations§
Source§impl Clone for ProxyConfig
impl Clone for ProxyConfig
Source§fn clone(&self) -> ProxyConfig
fn clone(&self) -> ProxyConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more