Middleware order question


Does the order in which we declare middlewares matter?
I suppose it does, but, if so, in what order should I declare them to be more optimized?


The middleware is processed in the order you have declared. I am not sure about optimization, however, sometimes you want one middleware to be executed before any other e.g. Logger().