Is there a way to get the IP address if Vaadin is running embedded behind apache?

I tried a couple of things and nothing seems to come back. Specifically I tried:


And then this possible solution which also didn’t work :

String header = VaadinService.getCurrentRequest().getHeader("x-forwarded-for");
if(header != null && "".equals(header))

But they all seem to bring back nothing. Any help would be appreciated.

The x-forwarded-for should work, if apache is configured to set that header.

Edit: mod_proxy_(http|ajp) and ProxyPass directive should be enough. Also, make sure mod_remoteip is disabled

That was my understanding too but it’s not working. It’s very odd…