Worked perfectly, thanks!
Pseudo-code for those interested:
Server server = component.getServers().add(Protocol.HTTP, 8080);
server.getContext().getParameters().add("useForwardedForHeader", "true");
Jerome Louvel wrote:
> Hi Tal,
>
> Have you set the "useForwardedForHeader" parameter to "true" on your server
> connector? This is necessary to prevent security issues with this header
> which can be compromised. I'll add a note to the Javadocs in
> ClientInfo#getUpstream and getForwardedAddresses methods.
>
> Best regards,
> Jerome Louvel
> --
> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>
>
>
> -----Message d'origine-----
> De : Tal Liron [mailto:[email protected]]
> Envoyé : mercredi 6 mai 2009 20:43
> À : [email protected]
> Objet : Upstream IP address
>
> Hi all,
>
>
> I'm having trouble with ClientInfo.getUpstreamAddress(). My setup is an
> Apache server with ProxyPass to my Restlet(svn)/Grizzly connector. This
> seems to always return 127.0.0.1, rather than the true upstream address.
>
>
> Any ideas?
>
>
> As far as I can tell, Apache is correctly setting the forwarding
> headers. Could this be a Grizzly issue, or a Restlet issue?
>
>
> -Tal
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=20835
> 27
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2292063
>
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2293993