Difference between client.ip and proxy.client.ip

yassertaeima
Participant III

In the Variable Reference

https://docs.apigee.com/api-platform/reference/variables-reference

There are two variables that are very similar

client.ip and proxy.client.ip

What is the difference between those two and when would the value be different between them?

Solved Solved
3 1 5,665
1 ACCEPTED SOLUTION

The variable "proxy.client.ip" is the X-Forwarded-For IP address whereas the "client.ip" gives the actual client IP (this could be the original client IP or a load balancer IP) and it is not dependent on the X-Fowarded-For header.

So if the client app does not take care of the manipulation of X-Forwarded-For header then we can use "proxy.client.ip" and "client.ip" interchangeably. Hope this clarifies your question.

https://docs.apigee.com/api-platform/reference/variables-reference

View solution in original post

1 REPLY 1

The variable "proxy.client.ip" is the X-Forwarded-For IP address whereas the "client.ip" gives the actual client IP (this could be the original client IP or a load balancer IP) and it is not dependent on the X-Fowarded-For header.

So if the client app does not take care of the manipulation of X-Forwarded-For header then we can use "proxy.client.ip" and "client.ip" interchangeably. Hope this clarifies your question.

https://docs.apigee.com/api-platform/reference/variables-reference