private function determineRemoteIpAddress(array $server): string
    {
        if (array_key_exists('HTTP_X_FORWARDED_FOR', $server) && filter_var($server['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)) {
            return $server['HTTP_X_FORWARDED_FOR'];
        } elseif (array_key_exists('HTTP_CLIENT_IP', $server) && filter_var($server['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP)) {
            return $server['HTTP_CLIENT_IP'];
        } elseif (array_key_exists('HTTP_TRUE_CLIENT_IP', $server) && filter_var($server['HTTP_TRUE_CLIENT_IP'], FILTER_VALIDATE_IP)) {
            return $server['HTTP_TRUE_CLIENT_IP'];
        }

        return $server['REMOTE_ADDR'];
    }