Support for arbitrary middleware