Openfire behind cloud load balancer - ger real IP

Our openfire 3.9.3 server lies behind a Rackspace cloud load balancer. As a result, all the client connections to openfire have the same private IP address, this of the load balancer.

As indicated in Why Does Every Visitor To My Cloud Sites Website Have The Same IP Address? | Knowledge Center | Rackspace Hosting the load balancer provides the real IP in the form of two server variables:

HTTP_X_CLUSTER_CLIENT_IP for non-SSL

HTTP_X_FORWARDED_FOR for SSL terminated connections

How can the above get incorporated within Openfire so that the logged-in users are shown with their correct real IP instead masked and replaced by the private IP of the load balancer?

Any information/advice welcome