Struct gateway_api::apis::experimental::httproutes::HTTPRouteRulesBackendRefsFiltersUrlRewritePath
source · pub struct HTTPRouteRulesBackendRefsFiltersUrlRewritePath {
pub replace_full_path: Option<String>,
pub replace_prefix_match: Option<String>,
pub type: HTTPRouteRulesBackendRefsFiltersUrlRewritePathType,
}Expand description
Path defines a path rewrite. Support: Extended
Fields§
§replace_full_path: Option<String>ReplaceFullPath specifies the value with which to replace the full path of a request during a rewrite or redirect.
replace_prefix_match: Option<String>ReplacePrefixMatch specifies the value with which to replace the prefix match of a request during a rewrite or redirect. For example, a request to “/foo/bar” with a prefix match of “/foo” and a ReplacePrefixMatch of “/xyz” would be modified to “/xyz/bar”.
Note that this matches the behavior of the PathPrefix match type. This matches full path elements. A path element refers to the list of labels in the path split by the / separator. When specified, a trailing / is ignored. For example, the paths /abc, /abc/, and /abc/def would all match the prefix /abc, but the path /abcd would not.
ReplacePrefixMatch is only compatible with a PathPrefix HTTPRouteMatch. Using any other HTTPRouteMatch type on the same HTTPRouteRule will result in the implementation setting the Accepted Condition for the Route to status: False.
Request Path | Prefix Match | Replace Prefix | Modified Path ———––|–––––––|––––––––|––––– /foo/bar | /foo | /xyz | /xyz/bar /foo/bar | /foo | /xyz/ | /xyz/bar /foo/bar | /foo/ | /xyz | /xyz/bar /foo/bar | /foo/ | /xyz/ | /xyz/bar /foo | /foo | /xyz | /xyz /foo/ | /foo | /xyz | /xyz/ /foo/bar | /foo |
type: HTTPRouteRulesBackendRefsFiltersUrlRewritePathTypeType defines the type of path modifier. Additional types may be added in a future release of the API.
Note that values may be added to this enum, implementations must ensure that unknown values will not cause a crash.
Unknown values here must result in the implementation setting the Accepted Condition for the Route to status: False, with a Reason of UnsupportedValue.
Trait Implementations§
source§impl Clone for HTTPRouteRulesBackendRefsFiltersUrlRewritePath
impl Clone for HTTPRouteRulesBackendRefsFiltersUrlRewritePath
source§fn clone(&self) -> HTTPRouteRulesBackendRefsFiltersUrlRewritePath
fn clone(&self) -> HTTPRouteRulesBackendRefsFiltersUrlRewritePath
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl<'de> Deserialize<'de> for HTTPRouteRulesBackendRefsFiltersUrlRewritePath
impl<'de> Deserialize<'de> for HTTPRouteRulesBackendRefsFiltersUrlRewritePath
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 HTTPRouteRulesBackendRefsFiltersUrlRewritePath
impl JsonSchema for HTTPRouteRulesBackendRefsFiltersUrlRewritePath
source§fn schema_name() -> String
fn schema_name() -> String
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more