pub struct SecurityHeadersMiddleware { /* private fields */ }
Expand description
HTTP Security Headers middleware for defense-in-depth security
Implementations§
Source§impl SecurityHeadersMiddleware
impl SecurityHeadersMiddleware
Sourcepub const fn with_config(config: SecurityHeadersConfig) -> Self
pub const fn with_config(config: SecurityHeadersConfig) -> Self
Create with custom configuration
Trait Implementations§
Source§impl Clone for SecurityHeadersMiddleware
impl Clone for SecurityHeadersMiddleware
Source§fn clone(&self) -> SecurityHeadersMiddleware
fn clone(&self) -> SecurityHeadersMiddleware
Returns a duplicate of the value. Read more
1.0.0 · 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 SecurityHeadersMiddleware
impl Debug for SecurityHeadersMiddleware
Source§impl Default for SecurityHeadersMiddleware
impl Default for SecurityHeadersMiddleware
Source§impl Middleware for SecurityHeadersMiddleware
impl Middleware for SecurityHeadersMiddleware
Source§fn process_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_request: &'life1 mut JsonRpcRequest,
_ctx: &'life2 mut RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn process_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_request: &'life1 mut JsonRpcRequest,
_ctx: &'life2 mut RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Process request before routing
Source§fn process_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
response: &'life1 mut JsonRpcResponse,
ctx: &'life2 RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn process_response<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
response: &'life1 mut JsonRpcResponse,
ctx: &'life2 RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Process response after routing
Auto Trait Implementations§
impl Freeze for SecurityHeadersMiddleware
impl RefUnwindSafe for SecurityHeadersMiddleware
impl Send for SecurityHeadersMiddleware
impl Sync for SecurityHeadersMiddleware
impl Unpin for SecurityHeadersMiddleware
impl UnwindSafe for SecurityHeadersMiddleware
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