Scenario
Retrieve the IP address of the actual originator of the API request in below mentioned scenario.
In the above deployment scenario, I had a requirement to the get IP address of the client from ESB.
Prerequisite
Solution
'X-Forwarded-For' header property is a transport level header property. This property is normally used by Load Balancer to stamp the IP address of the client which is requesting a service from back-end server.
This property can be used append Client-IP address in the WSO2 API Manager. Later on by accessing this property, relevant Client-IP address can be fetched from ESB side. I included following filter configuration in WSO2 API Manager to append Client-IP address to 'X-Forwarded-For' header property.
Now from the ESB side, you can obtain the Client-IP address from 'X-Forwarded-For' header property by having following synapse configuration.
No comments:
Post a Comment