Skip to main content

FileClusterFrontendConfig

Struct FileClusterFrontendConfig 

Source
pub struct FileClusterFrontendConfig {
Show 21 fields pub address: SocketAddr, pub hostname: Option<String>, pub alpn: Vec<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>§alpn: Vec<String>

TCP frontend only (sozu-proxy/sozu#1279): ALPN protocol names to match, read from the TLS ClientHello during the same preread that resolves hostname (mapped to the wire sni field for TCP frontends). Empty (the default) is the catch-all for this frontend’s hostname/SNI on its listener. Rejected on HTTP/HTTPS frontends — ALPN there is negotiated by the listener’s alpn_protocols, not per-frontend.

§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§tags: Option<BTreeMap<String, String>>§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§

Trait Implementations§

Source§

impl Clone for FileClusterFrontendConfig

Source§

fn clone(&self) -> FileClusterFrontendConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FileClusterFrontendConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for FileClusterFrontendConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for FileClusterFrontendConfig

Source§

impl Hash for FileClusterFrontendConfig

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for FileClusterFrontendConfig

Source§

fn eq(&self, other: &FileClusterFrontendConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for FileClusterFrontendConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for FileClusterFrontendConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V