Improve the doc of the middleware example