pub struct ProxyConfig {
pub path: Option<String>,
pub domain: Option<String>,
pub port: Option<u16>,
pub target: String,
pub middlewares: Option<Vec<String>>,
}Expand description
proxy configuration.
Note: path should not be set at the same time as either domain
or port. path takes precedence and the other sources will be ignored.
if the path, domain and port are all unset, validation will fail.
Fields§
§path: Option<String>an axum route
with a *path wildcard that will be appended to the target.
i.e. "/some/path/{*path}"
Note: MUST end in a trailing /{*path}
domain: Option<String>custom domain with an ALIAS/CNAME pointing at the primary OrdinaryConfig::domain
and a TXT record indicating ownership (i.e. ordinary-proxy=your.config.domain).
i.e example.com
Note: if a path is specified, the domain will be ignored
port: Option<u16>preferred port that the proxy will listen on in a --dedicated-ports
configured multi-tenant server OR a standalone app instance.
i.e 8081
Note: if a path is specified, the port will be ignored,
and port will not be tried without domain being present.
target: Stringurl for resource to proxy.
i.e. https://example.com
middlewares: Option<Vec<String>>list of names of middleware to include for this proxy
Trait Implementations§
Source§impl Clone for ProxyConfig
impl Clone for ProxyConfig
Source§fn clone(&self) -> ProxyConfig
fn clone(&self) -> ProxyConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ComposeSchema for ProxyConfig
impl ComposeSchema for ProxyConfig
Source§impl Debug for ProxyConfig
impl Debug for ProxyConfig
Source§impl<'de> Deserialize<'de> for ProxyConfig
impl<'de> Deserialize<'de> for ProxyConfig
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 JsonSchema for ProxyConfig
impl JsonSchema for ProxyConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more