code: public static String extractIPAddress(final HttpServletRequest request) {
  
          String ip = request.getHeader("x-forwarded-for");
          if (isIPAdressValid(ip)) {
              return ip;
          }
          ip = request.getHeader("Proxy-Client-IP");
          if (isIPAdressValid(ip)) {
              return ip;
          }
          ip = request.getHeader("WL-Proxy-Client-IP");
          if (isIPAdressValid(ip)) {
              return ip;
          }
          return request.getRemoteAddr();
      }
docs: Extracts the IP address from the given {@link javax.servlet.http.HttpServletRequest}.
  
  @param request to inspect
  
  @return the IP address from the given request