Replaced request.host by request.headers["Host"]