def get_client_ip(request) -> str:
    """
    Return the client IP.

    This is a best effort way of fetching the client IP which does not protect
    against spoofing and hich tries to understand some proxying.

    This should NOT be relied upon for serius stuff.
    """
    x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR')
    if x_forwarded_for:
        ip = x_forwarded_for.split(',')[0]
    else:
        ip = request.META.get('REMOTE_ADDR')
    return ip