Mageshwaran schrieb:
Hi All,
In my application, am using request.getRemoteHost() to get the host
name where the client is running. But it is returning the proxy
address if configured instead of host address/ host name. Can any one
help me to solve this issue?
Thanks in Advance,
Magesh.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
Short answer: You can't. A proxy by definition executes the request on
behalf of the client and can therefore completely mask the actual client
host address. There are, however, non-RFC-complient request headers that
you might query:
request.getHeader("x-forwarded-for")
But be warned: Many proxies don't supply this information correctly, so
you have to live with what getRemoteHost() gives you.
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org