Allow splicing of middleware into endpoint initialization