pub struct MiddlewareIpAllowList {
pub ip_strategy: Option<MiddlewareIpAllowListIpStrategy>,
pub reject_status_code: Option<i64>,
pub source_range: Option<Vec<String>>,
}
Expand description
IPAllowList holds the IP allowlist middleware configuration. This middleware limits allowed requests based on the client IP. More info: https://doc.traefik.io/traefik/v3.3/middlewares/http/ipallowlist/
Fields§
§ip_strategy: Option<MiddlewareIpAllowListIpStrategy>
IPStrategy holds the IP strategy configuration used by Traefik to determine the client IP. More info: https://doc.traefik.io/traefik/v3.3/middlewares/http/ipallowlist/#ipstrategy
reject_status_code: Option<i64>
RejectStatusCode defines the HTTP status code used for refused requests. If not set, the default is 403 (Forbidden).
source_range: Option<Vec<String>>
SourceRange defines the set of allowed IPs (or ranges of allowed IPs by using CIDR notation).
Implementations§
Source§impl MiddlewareIpAllowList
impl MiddlewareIpAllowList
Sourcepub fn builder() -> MiddlewareIpAllowListBuilder<((), (), ())>
pub fn builder() -> MiddlewareIpAllowListBuilder<((), (), ())>
Create a builder for building MiddlewareIpAllowList
.
On the builder, call .ip_strategy(...)
(optional), .reject_status_code(...)
(optional), .source_range(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of MiddlewareIpAllowList
.
Trait Implementations§
Source§impl Clone for MiddlewareIpAllowList
impl Clone for MiddlewareIpAllowList
Source§fn clone(&self) -> MiddlewareIpAllowList
fn clone(&self) -> MiddlewareIpAllowList
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MiddlewareIpAllowList
impl Debug for MiddlewareIpAllowList
Source§impl Default for MiddlewareIpAllowList
impl Default for MiddlewareIpAllowList
Source§fn default() -> MiddlewareIpAllowList
fn default() -> MiddlewareIpAllowList
Source§impl<'de> Deserialize<'de> for MiddlewareIpAllowList
impl<'de> Deserialize<'de> for MiddlewareIpAllowList
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 MiddlewareIpAllowList
impl JsonSchema for MiddlewareIpAllowList
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 MiddlewareIpAllowList
impl PartialEq for MiddlewareIpAllowList
Source§impl Serialize for MiddlewareIpAllowList
impl Serialize for MiddlewareIpAllowList
impl StructuralPartialEq for MiddlewareIpAllowList
Auto Trait Implementations§
impl Freeze for MiddlewareIpAllowList
impl RefUnwindSafe for MiddlewareIpAllowList
impl Send for MiddlewareIpAllowList
impl Sync for MiddlewareIpAllowList
impl Unpin for MiddlewareIpAllowList
impl UnwindSafe for MiddlewareIpAllowList
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