"Client-Ip" contains an unroutable "100.64.x.x" address

Our Netlify application uses a Function, which relies on the original IP address provided in the client-ip request header.

All Functions receive an event object as an argument. For us, the value of event.headers['client-ip'] recently changed to a 100.64.xx address.

According to Wikipedia, this is a reserved, unusable address :

This address block should not be used on private networks or on the public Internet.

This started appearing around April 22, 2021. Did anything change in the internal Netlify routing that would cause this IP value to appear as the client-ip?

I just ran into this too @abhchand. Very confusing, and it broke some of my functions in some interesting ways.

According to Is the "Client-IP" header going to be supported long term? you shouldn’t use this header anyway though. Instead, there’s a X-Nf-Client-Connection-Ip header that’s officially supported and which does appear to work correctly right now and show the real client IP. If you just switch to that then everything should work.

1 Like

this also broke our site when trying to determine currency for visiting client-ip. switching from client-ip to x-nf-client-connection-ip from event.headers seemed to do the trick.