pub struct HTTPRouteRulesFiltersResponseHeaderModifier {
pub add: Option<Vec<HTTPRouteRulesFiltersResponseHeaderModifierAdd>>,
pub remove: Option<Vec<String>>,
pub set: Option<Vec<HTTPRouteRulesFiltersResponseHeaderModifierSet>>,
}
Expand description
ResponseHeaderModifier defines a schema for a filter that modifies response headers.
Support: Extended
Fields§
§add: Option<Vec<HTTPRouteRulesFiltersResponseHeaderModifierAdd>>
Add adds the given header(s) (name, value) to the request before the action. It appends to any existing values associated with the header name.
Input: GET /foo HTTP/1.1 my-header: foo
Config: add:
- name: “my-header” value: “bar,baz”
Output: GET /foo HTTP/1.1 my-header: foo,bar,baz
remove: Option<Vec<String>>
Remove the given header(s) from the HTTP request before the action. The value of Remove is a list of HTTP header names. Note that the header names are case-insensitive (see https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
Input: GET /foo HTTP/1.1 my-header1: foo my-header2: bar my-header3: baz
Config: remove: [“my-header1”, “my-header3”]
Output: GET /foo HTTP/1.1 my-header2: bar
set: Option<Vec<HTTPRouteRulesFiltersResponseHeaderModifierSet>>
Set overwrites the request with the given header (name, value) before the action.
Input: GET /foo HTTP/1.1 my-header: foo
Config: set:
- name: “my-header” value: “bar”
Output: GET /foo HTTP/1.1 my-header: bar
Trait Implementations§
Source§impl Clone for HTTPRouteRulesFiltersResponseHeaderModifier
impl Clone for HTTPRouteRulesFiltersResponseHeaderModifier
Source§fn clone(&self) -> HTTPRouteRulesFiltersResponseHeaderModifier
fn clone(&self) -> HTTPRouteRulesFiltersResponseHeaderModifier
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for HTTPRouteRulesFiltersResponseHeaderModifier
impl Default for HTTPRouteRulesFiltersResponseHeaderModifier
Source§fn default() -> HTTPRouteRulesFiltersResponseHeaderModifier
fn default() -> HTTPRouteRulesFiltersResponseHeaderModifier
Source§impl<'de> Deserialize<'de> for HTTPRouteRulesFiltersResponseHeaderModifier
impl<'de> Deserialize<'de> for HTTPRouteRulesFiltersResponseHeaderModifier
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 HTTPRouteRulesFiltersResponseHeaderModifier
impl JsonSchema for HTTPRouteRulesFiltersResponseHeaderModifier
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(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moreSource§impl PartialEq for HTTPRouteRulesFiltersResponseHeaderModifier
impl PartialEq for HTTPRouteRulesFiltersResponseHeaderModifier
Source§fn eq(&self, other: &HTTPRouteRulesFiltersResponseHeaderModifier) -> bool
fn eq(&self, other: &HTTPRouteRulesFiltersResponseHeaderModifier) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for HTTPRouteRulesFiltersResponseHeaderModifier
Auto Trait Implementations§
impl Freeze for HTTPRouteRulesFiltersResponseHeaderModifier
impl RefUnwindSafe for HTTPRouteRulesFiltersResponseHeaderModifier
impl Send for HTTPRouteRulesFiltersResponseHeaderModifier
impl Sync for HTTPRouteRulesFiltersResponseHeaderModifier
impl Unpin for HTTPRouteRulesFiltersResponseHeaderModifier
impl UnwindSafe for HTTPRouteRulesFiltersResponseHeaderModifier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more