Closed GopherJ closed 5 years ago
middleware does not have access to concrete route. i think it is better to use extractor for this purpose. in 1.0-alpha you can assign arbitrary data to route, and you can access this data during extracting process
@fafhrd91 Thanks for your reply, do we have some documentations on it? Hope you a great week-end!
Brief https://actix.rs/actix-web/actix_web/struct.Route.html#method.data
RouteData
is extractor
@DoumanAsh Thanks I will read that!
Hello, do we have the ability to add meta data to route (like: require_admin: true) I would like to implement a token check middleware, differents tokens have differents rights and abilities, differents route paths require differents rights to access.
I would like to add meta info when I register a ressource and get it in handler.