One of the things that we are missing coming from Iron is the ability to set middleware on a per resource level. For example, we have Authenticated middleware that we'd like to set only on the authenticated resources. Currently, actix-web does not allow this, so we have to either not use middleware for auth, or try to hack around in less than elegant ways. It would be great to have this ability, or some other supported pattern.
You can set middleware per resource. It is not possible to use middlewares on route level
https://actix.rs/actix-web/actix_web/dev/struct.Resource.html#method.middleware
Thanks @fafhrd91 .. apologies for missing the resource level middleware in the doc. I'm trying this out, unfortunately running into another blocking issue that I will post separately.