subdomains now working

You were only sending request.domain which does not include the subdomain
I changed this to request.host which includes the subdomain.
Now works as expected