middleware is now domain specific