add a middleware getter