Hi,
I need to register the external IP Address of users that are logged in into a cuba application. So, I want to ask you if there is any method in the platform giving this information - Please note that our application is running behind a reverse proxy and I am wondering how I could possibly obtain from request’s X-Forwarded-For header this info.
Then in the CUBA application you can just call javax.servlet.ServletRequest#getRemoteAddr to get real IP address.
I think you can use this method: com.haulmont.cuba.web.sys.RequestContext#get
to obtain current http request object in the web module.
Also note that CUBA already stored IP addresses of logged in users and shows them in Administration → User Sessions screen.
You can obtain this information programmatically by using com.haulmont.cuba.security.app.UserSessionService#getUserSessionInfo service method.