This should be a common requirement. Please suggest.
My service runs behind a proxy which receives http request from the client and forwards it to one of the many available servers .
Now I want to log the identity (ip address and hostname) of the caller. But the issue is that since I get the request from the proxy, I happen to get proxy details (and not the callers). when I do a request.getRemoteAddr();
and subsequently InetAddress.getByName(ip).getHostName()
Is there a way to achieve this ?