pub struct ProxyRoute {
pub prefix: String,
pub target_url: Option<String>,
pub dir: Option<String>,
pub fallback: Option<String>,
pub strip_prefix: bool,
pub allow: Vec<String>,
}Expand description
One path-prefix route of a v2 proxy (RFC 023 §7). Wire-shaped: exactly
one of target_url / dir must be set. Longest prefix wins (D11).
Fields§
§prefix: StringPath prefix to match (must start with /).
target_url: Option<String>Proxy target URL (e.g. http://localhost:8000).
dir: Option<String>Static directory to serve (absolute path on the serving machine).
fallback: Option<String>SPA fallback rewritten on static misses (e.g. /index.html);
only meaningful with dir.
strip_prefix: boolStrip the matched prefix before proxying (default false — D11;
only meaningful with target_url).
allow: Vec<String>Per-route loginName globs; overrides the config-level allow.
Trait Implementations§
Source§impl Clone for ProxyRoute
impl Clone for ProxyRoute
Source§fn clone(&self) -> ProxyRoute
fn clone(&self) -> ProxyRoute
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProxyRoute
impl Debug for ProxyRoute
Source§impl<'de> Deserialize<'de> for ProxyRoute
impl<'de> Deserialize<'de> for ProxyRoute
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ProxyRoute
impl PartialEq for ProxyRoute
Source§impl Serialize for ProxyRoute
impl Serialize for ProxyRoute
impl StructuralPartialEq for ProxyRoute
Auto Trait Implementations§
impl Freeze for ProxyRoute
impl RefUnwindSafe for ProxyRoute
impl Send for ProxyRoute
impl Sync for ProxyRoute
impl Unpin for ProxyRoute
impl UnsafeUnpin for ProxyRoute
impl UnwindSafe for ProxyRoute
Blanket Implementations§
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
Mutably borrows from an owned value. Read more