Set correct clientIp when XFF header is present

Fixes issue #357