added domainRouter to middlewares