Middleware is software assembled into a pipeline to handle request and responses. Each component:
- Chooses if he passes the request to the next component.
- Can perform work before and after the next component.
(an example can be an authorization middleware)