code: function getClientIp(req) {
      var xff = req.get('x-forwarded-for');
      if (xff) {
        var ips = xff.split(',').map(function onIp(ip) {
          return ip.trim();
        });
        var ip = ips[ips.length - 1];
        if (ip) {
          return ip;
        }
      }
      return req.ip;
    }
docs: Return the client address from the last IP address in X-Forwarded-For HTTP header. If not possible to
  obtain it from X-Forwarded-For header, then return req.ip (however, this value typically is the load
  balancer IP address and it does not provide any valuable information).
  
  @param {Object} req
  Express request
  @return {String}
  Client IP address