Fix IP matching when a proxy is used.