fix logging ips to the logs in the presence of headers indicating the real source IP
why was this passed by const reference