Struct k8s_gateway_api::HttpRequestHeaderFilter
source · [−]pub struct HttpRequestHeaderFilter {
pub set: Option<Vec<HttpHeader>>,
pub add: Option<Vec<HttpHeader>>,
pub remove: Option<Vec<String>>,
}
Expand description
HTTPRequestHeaderFilter defines configuration for the RequestHeaderModifier filter.
Fields
set: Option<Vec<HttpHeader>>
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
add: Option<Vec<HttpHeader>>
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”
Output: GET /foo HTTP/1.1 my-header: foo my-header: bar
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
Trait Implementations
sourceimpl Clone for HttpRequestHeaderFilter
impl Clone for HttpRequestHeaderFilter
sourcefn clone(&self) -> HttpRequestHeaderFilter
fn clone(&self) -> HttpRequestHeaderFilter
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for HttpRequestHeaderFilter
impl Debug for HttpRequestHeaderFilter
sourceimpl<'de> Deserialize<'de> for HttpRequestHeaderFilter
impl<'de> Deserialize<'de> for HttpRequestHeaderFilter
sourcefn 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
sourceimpl JsonSchema for HttpRequestHeaderFilter
impl JsonSchema for HttpRequestHeaderFilter
sourcefn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
sourcefn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the $ref
keyword. Read more
sourceimpl PartialEq<HttpRequestHeaderFilter> for HttpRequestHeaderFilter
impl PartialEq<HttpRequestHeaderFilter> for HttpRequestHeaderFilter
sourcefn eq(&self, other: &HttpRequestHeaderFilter) -> bool
fn eq(&self, other: &HttpRequestHeaderFilter) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &HttpRequestHeaderFilter) -> bool
fn ne(&self, other: &HttpRequestHeaderFilter) -> bool
This method tests for !=
.
sourceimpl Serialize for HttpRequestHeaderFilter
impl Serialize for HttpRequestHeaderFilter
impl StructuralPartialEq for HttpRequestHeaderFilter
Auto Trait Implementations
impl RefUnwindSafe for HttpRequestHeaderFilter
impl Send for HttpRequestHeaderFilter
impl Sync for HttpRequestHeaderFilter
impl Unpin for HttpRequestHeaderFilter
impl UnwindSafe for HttpRequestHeaderFilter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more