pub struct DefaultConfig {
pub rate_limit: RateLimitConfig,
pub cleanup: RateLimitCleanupConfig,
pub proxy: ProxyConfig,
pub allowed_proxy_ips: Option<Vec<String>>,
pub blocked_ips: Vec<String>,
pub blocked_methods: Vec<String>,
pub blocked_patterns: Vec<String>,
pub max_connections: usize,
pub auth_credentials: Credentials,
pub auth_realm: String,
pub bearer_token: Option<String>,
pub forward_authorization_header: bool,
}Expand description
Configuration backed by plain fields — pre-populated with WiseGate’s defaults.
Use this when you want to drop wisegate-core into an application without
designing your own configuration plumbing. Mutate the fields directly,
then pass the struct (often wrapped in an Arc) to
request_handler::handle_request.
Fields§
§rate_limit: RateLimitConfigRate limit policy applied per client IP.
cleanup: RateLimitCleanupConfigRate limiter housekeeping policy.
proxy: ProxyConfigUpstream proxy behaviour (timeout, body size cap).
allowed_proxy_ips: Option<Vec<String>>Trusted proxy IPs. Some activates strict mode; None is permissive.
blocked_ips: Vec<String>Client IPs that should be rejected with 403.
blocked_methods: Vec<String>HTTP methods that should be rejected with 405.
blocked_patterns: Vec<String>URL substrings that should be rejected with 404.
max_connections: usizeHard cap on concurrent connections; 0 disables the limit.
auth_credentials: CredentialsBasic Auth credential set (empty disables Basic Auth).
auth_realm: StringRealm advertised in WWW-Authenticate.
bearer_token: Option<String>Bearer token (None or empty disables bearer auth).
Forward the Authorization header to the upstream after wisegate auth.
Trait Implementations§
Source§impl AuthenticationProvider for DefaultConfig
impl AuthenticationProvider for DefaultConfig
Source§fn auth_credentials(&self) -> &Credentials
fn auth_credentials(&self) -> &Credentials
Source§fn auth_realm(&self) -> &str
fn auth_realm(&self) -> &str
Source§fn bearer_token(&self) -> Option<&str>
fn bearer_token(&self) -> Option<&str>
Authorization header to the upstream service. Read moreSource§fn is_basic_auth_enabled(&self) -> bool
fn is_basic_auth_enabled(&self) -> bool
Source§fn is_bearer_auth_enabled(&self) -> bool
fn is_bearer_auth_enabled(&self) -> bool
Source§fn is_auth_enabled(&self) -> bool
fn is_auth_enabled(&self) -> bool
Source§impl Clone for DefaultConfig
impl Clone for DefaultConfig
Source§fn clone(&self) -> DefaultConfig
fn clone(&self) -> DefaultConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ConnectionProvider for DefaultConfig
impl ConnectionProvider for DefaultConfig
Source§fn max_connections(&self) -> usize
fn max_connections(&self) -> usize
Source§impl Debug for DefaultConfig
impl Debug for DefaultConfig
Source§impl Default for DefaultConfig
impl Default for DefaultConfig
Source§impl FilteringProvider for DefaultConfig
impl FilteringProvider for DefaultConfig
Source§fn blocked_ips(&self) -> &[String]
fn blocked_ips(&self) -> &[String]
Source§fn blocked_methods(&self) -> &[String]
fn blocked_methods(&self) -> &[String]
Source§fn blocked_patterns(&self) -> &[String]
fn blocked_patterns(&self) -> &[String]
Source§impl ProxyProvider for DefaultConfig
impl ProxyProvider for DefaultConfig
Source§fn proxy_config(&self) -> &ProxyConfig
fn proxy_config(&self) -> &ProxyConfig
Source§fn allowed_proxy_ips(&self) -> Option<&[String]>
fn allowed_proxy_ips(&self) -> Option<&[String]>
Some, strict mode is enabled. When None, permissive mode is used.