moved connectDomain down the middleare stack to see if stop some random
errors (hanging when serving static files)