pub struct WafRule {
pub id: String,
pub pattern: String,
pub target: String,
}Expand description
A single operator-defined WAF deny pattern (a [[waf.rules]] entry).
Fields§
§id: StringIdentifier reported in logs/metrics when this rule matches (defaults to custom-<n>).
pattern: StringRegular expression (RE2 syntax: linear-time, no backreferences/lookaround, so it can’t ReDoS the proxy). A request matching it in any targeted location is treated as a hit.
target: StringRequest location to match against: “path” (path+query, default), “headers”, “body”, or
“all”. A location is only examined when its inspect_* flag above is also enabled.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WafRule
impl<'de> Deserialize<'de> for WafRule
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WafRule
impl RefUnwindSafe for WafRule
impl Send for WafRule
impl Sync for WafRule
impl Unpin for WafRule
impl UnsafeUnpin for WafRule
impl UnwindSafe for WafRule
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
Mutably borrows from an owned value. Read more