add Configuration#middlewares to customize middleware stack