pub struct UIContentSecurityPolicyResponseMiddleware {
pub hashes: Vec<JavaScriptFile>,
}
Expand description
This tide MiddleWare adds headers like Content-Security-Policy and similar families. If it keeps adding more things then probably rename the middleware :)
Fields§
§hashes: Vec<JavaScriptFile>
Implementations§
source§impl UIContentSecurityPolicyResponseMiddleware
impl UIContentSecurityPolicyResponseMiddleware
pub fn new(hashes: Vec<JavaScriptFile>) -> Self
Trait Implementations§
source§impl Default for UIContentSecurityPolicyResponseMiddleware
impl Default for UIContentSecurityPolicyResponseMiddleware
source§fn default() -> UIContentSecurityPolicyResponseMiddleware
fn default() -> UIContentSecurityPolicyResponseMiddleware
Returns the “default value” for a type. Read more
source§impl<State: Clone + Send + Sync + 'static> Middleware<State> for UIContentSecurityPolicyResponseMiddleware
impl<State: Clone + Send + Sync + 'static> Middleware<State> for UIContentSecurityPolicyResponseMiddleware
source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
request: Request<State>,
next: Next<'life1, State>
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>( &'life0 self, request: Request<State>, next: Next<'life1, State> ) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Asynchronously handle the request, and return a response.