Hello Tamás
the ClientInfo.getAddresses() method relies on the content of the
"X-Forwarded-For" HTTP header. Basically, it contains a coma separated
list of the IPS of the originating client and the intermediate proxies
as follow:
X-Forwarded-For: client1, proxy1, proxy2
The first value of this list is the IP of the originating client. This
value is also returned by the ClientInfo#getAddress() method.
=> http://en.wikipedia.org/wiki/X-Forwarded-For
Best regards,
Thierry Boileau
--
Restlet ~ Core developer ~ http://www.restlet.org <http://www.restlet.org/>
Noelios Technologies ~ Co-founder ~ http://www.noelios.com
<http://www.noelios.com/>
Hi there,
i am curious, is there any way to get the _real_ client address from
Request.getClientInfo()?
I am talking about the situation, when you have your Restlet App
(whether standalone, or running in Servlet Container) fronted by
mod_proxy + httpd...
Something like this (example found on the net, in PHP):
http://www.zen-cart.com/forum/showpost.php?p=437632&postcount=8
<http://www.zen-cart.com/forum/showpost.php?p=437632&postcount=8>
The ClientInfo.getAddresses() "smells" like right place to sniff
around, but i don't get the Javadoc and what it really does....
--
Thanks,
~t~