Adding support for middlewares for each route