pub struct MethodAllowlist { /* private fields */ }Expand description
Rejects requests using HTTP methods not in the allowlist. TRACE and CONNECT are always blocked as they can enable cross-site tracing and proxy tunneling attacks.
Implementations§
Source§impl MethodAllowlist
impl MethodAllowlist
Sourcepub fn default_safe() -> Self
pub fn default_safe() -> Self
Create with the default safe set: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS.
Trait Implementations§
Source§impl Middleware for MethodAllowlist
impl Middleware for MethodAllowlist
Auto Trait Implementations§
impl Freeze for MethodAllowlist
impl RefUnwindSafe for MethodAllowlist
impl Send for MethodAllowlist
impl Sync for MethodAllowlist
impl Unpin for MethodAllowlist
impl UnsafeUnpin for MethodAllowlist
impl UnwindSafe for MethodAllowlist
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