pub struct GrpcConfig {
pub enabled: bool,
pub max_message_bytes: u64,
pub max_fields: u32,
pub max_depth: u32,
pub on_compressed: CompressedPolicy,
}Expand description
gRPC module configuration (gRPC phase). Structural DoS/abuse caps on the framed
protobuf body (message size / field count / nesting depth) + a compressed-payload
policy. Structural only — protobuf field CONTENT flows to the normal content modules
via the §6 derived channel, not through this module. Counts come from the
grpc_extract pass.
Fields§
§enabled: boolDefault OFF (opt-in per deployment; needs HTTP/2).
max_message_bytes: u64Max total inspectable payload bytes across the framed messages in one request.
max_fields: u32Max protobuf field count (field-bomb cap).
max_depth: u32Max sub-message nesting depth (depth-bomb cap).
on_compressed: CompressedPolicyWhat to do with a compressed (un-inspectable) payload. Default reject (fail-closed).
Trait Implementations§
Source§impl Clone for GrpcConfig
impl Clone for GrpcConfig
Source§fn clone(&self) -> GrpcConfig
fn clone(&self) -> GrpcConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GrpcConfig
impl Debug for GrpcConfig
Source§impl Default for GrpcConfig
impl Default for GrpcConfig
Source§impl<'de> Deserialize<'de> for GrpcConfig
impl<'de> Deserialize<'de> for GrpcConfig
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 GrpcConfig
impl RefUnwindSafe for GrpcConfig
impl Send for GrpcConfig
impl Sync for GrpcConfig
impl Unpin for GrpcConfig
impl UnsafeUnpin for GrpcConfig
impl UnwindSafe for GrpcConfig
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