Fix failing test cases caused by X-Forwarded-For