implement getHost to make cross site urls work