added subdomain middleware