I think here we should either use the Host header or use an explicit URL from config. Probably could simply remove the fallback to wrq:host_tokens - really not sure that is doing anything other than reading from the host header anyhow (could test that).