def getClientIP(request):
    """
    Pull the requested client IP address from the X-Forwarded-For request
    header. If there is more than one IP address in the value, it will return
    the first one.

    For more info, see: 'def access_route' in
    https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/wrappers.py

    :param request:
    :return str: The client IP address, or none if neither the X-Forwarded-For
       header, nor REMOTE_ADDR are present in the environment.
    """
    if request.access_route > 0:
        ip = request.access_route[0]
    else:
        ip = None
    return ip