pub struct FileClusterFrontendConfig {Show 20 fields
pub address: SocketAddr,
pub hostname: Option<String>,
pub path: Option<String>,
pub path_type: Option<PathRuleType>,
pub method: Option<String>,
pub certificate: Option<String>,
pub key: Option<String>,
pub certificate_chain: Option<String>,
pub tls_versions: Vec<TlsVersion>,
pub position: RulePosition,
pub tags: Option<BTreeMap<String, String>>,
pub redirect: Option<String>,
pub redirect_scheme: Option<String>,
pub redirect_template: Option<String>,
pub rewrite_host: Option<String>,
pub rewrite_path: Option<String>,
pub rewrite_port: Option<u32>,
pub required_auth: Option<bool>,
pub headers: Option<Vec<HeaderEditConfig>>,
pub hsts: Option<FileHstsConfig>,
}Fields§
§address: SocketAddr§hostname: Option<String>§path: Option<String>creates a path routing rule where the request URL path has to match this
path_type: Option<PathRuleType>declares whether the path rule is Prefix (default), Regex, or Equals
method: Option<String>§certificate: Option<String>§key: Option<String>§certificate_chain: Option<String>§tls_versions: Vec<TlsVersion>§position: RulePosition§redirect: Option<String>Frontend-level redirect policy. Accepted values are forward
(default — route to the backend), permanent (return 301 with the
computed Location), or unauthorized (return 401 with
WWW-Authenticate: Basic realm=…). Case-insensitive.
redirect_scheme: Option<String>Scheme used when emitting a permanent redirect’s Location. Accepted
values are use-same (default — preserve request scheme), use-http,
use-https. Case-insensitive.
redirect_template: Option<String>Optional template applied to the emitted permanent-redirect response
body. Supports the %REDIRECT_LOCATION and other variables
documented in doc/configure.md.
rewrite_host: Option<String>Rewrite host template. Supports $HOST[n] / $PATH[n] placeholders
populated from regex captures collected during routing.
rewrite_path: Option<String>Rewrite path template. Same grammar as rewrite_host.
rewrite_port: Option<u32>Optional literal port override on the rewritten URL.
required_auth: Option<bool>When true, requests routed through this frontend must carry a valid
Authorization: Basic <user:pass> header whose hash matches one of
the cluster’s authorized_hashes. Default: false.
headers: Option<Vec<HeaderEditConfig>>Header mutations applied to requests and/or responses passing through
this frontend. See HeaderEditConfig for the empty-value-deletes
semantics (HAProxy del-header parity).
hsts: Option<FileHstsConfig>Per-frontend HSTS (RFC 6797) policy. When set, overrides any
listener-default HSTS for this frontend. Set enabled = false
to suppress an inherited listener default. Per RFC 6797 §7.2,
HSTS is rejected on plain-HTTP frontends at config-load time.
Implementations§
Source§impl FileClusterFrontendConfig
impl FileClusterFrontendConfig
pub fn to_tcp_front(&self) -> Result<TcpFrontendConfig, ConfigError>
pub fn to_http_front( &self, _cluster_id: &str, ) -> Result<HttpFrontendConfig, ConfigError>
Trait Implementations§
Source§impl Clone for FileClusterFrontendConfig
impl Clone for FileClusterFrontendConfig
Source§fn clone(&self) -> FileClusterFrontendConfig
fn clone(&self) -> FileClusterFrontendConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FileClusterFrontendConfig
impl Debug for FileClusterFrontendConfig
Source§impl<'de> Deserialize<'de> for FileClusterFrontendConfig
impl<'de> Deserialize<'de> for FileClusterFrontendConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for FileClusterFrontendConfig
impl Hash for FileClusterFrontendConfig
Source§impl PartialEq for FileClusterFrontendConfig
impl PartialEq for FileClusterFrontendConfig
Source§fn eq(&self, other: &FileClusterFrontendConfig) -> bool
fn eq(&self, other: &FileClusterFrontendConfig) -> bool
self and other values to be equal, and is used by ==.impl Eq for FileClusterFrontendConfig
impl StructuralPartialEq for FileClusterFrontendConfig
Auto Trait Implementations§
impl Freeze for FileClusterFrontendConfig
impl RefUnwindSafe for FileClusterFrontendConfig
impl Send for FileClusterFrontendConfig
impl Sync for FileClusterFrontendConfig
impl Unpin for FileClusterFrontendConfig
impl UnsafeUnpin for FileClusterFrontendConfig
impl UnwindSafe for FileClusterFrontendConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.