You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where the matchit router map for "before/after" request type allows for only one key and panics on duplicate registration.
That's the case of route middlewares, but is handled in case of global middlewares which has a Vec<FunctionInfo>, right?
for before_middleware in before_middlewares {
request = matchexecute_middleware_function(&request,&before_middleware).await{Ok(MiddlewareReturn::Request(r)) => r,Ok(MiddlewareReturn::Response(r)) => {// If a before middleware returns a response, we abort the request and return the responsereturn r;}Err(e) => {error!("Error while executing before middleware function for endpoint `{}`: {}",
req.uri().path(),
get_traceback(e.downcast_ref::<PyErr>().unwrap()));returnResponse::internal_server_error(None);}};}
Speaking of which, I couldn't find documentation on how to add global middlewares from python... the add_global_middleware function is not yet exposed to python, is that it? Sry if I missed sth in the docs xP
The text was updated successfully, but these errors were encountered: