adds custom middleware to strip off subdomains
remove spurious print statement