meher
July 26, 2018, 8:11am
1
Hi,
I have a requirement like I need to capture IP Address of client and send it as a header to the backend APIs. Can some one please help with how to approach for this.
Thanks
Meher.
@meher Hi,
Maybe have a look at this post:
Hi,
This is a typical behavior/drawback of many reverse-proxies and load-balancers. Luckily for you, and as one would expect, there exist ways to circumvent them!
Retrieving the client IP in your API
First and foremost, Kong will set the X-Forwarded-For header for you since 0.11.0. You can use its value in your upstream services to retrieve the client IP. This is, I believe, the answer you are looking for.
But let’s take a deeper dive here, because there are other important areas around this …
And let us know if it helps.
meher
July 26, 2018, 1:15pm
3
Thanks much. Looks like it helps me.