def reload_config(self, config: Dict[str, Any]) -> None:
        """Reload REST API configuration.

        :param config: dictionary representing values under the ``restapi`` configuration section.

        :raises:
            :class:`ValueError`: if ``listen`` key is not present in *config*.
        """
        if 'listen' not in config:  # changing config in runtime
            raise ValueError('Can not find "restapi.listen" config')

        self.__allowlist = tuple(self._build_allowlist(config.get('allowlist')))
        self.__allowlist_include_members = config.get('allowlist_include_members')

        ssl_options = {n: config[n] for n in ('certfile', 'keyfile', 'keyfile_password',
                                              'cafile', 'ciphers') if n in config}

        self.http_extra_headers = config.get('http_extra_headers') or {}
        self.http_extra_headers.update((config.get('https_extra_headers') or {}) if ssl_options.get('certfile') else {})

        if isinstance(config.get('verify_client'), str):
            ssl_options['verify_client'] = config['verify_client'].lower()

        if self.__listen != config['listen'] or self.__ssl_options != ssl_options or self._received_new_cert:
            self.__initialize(config['listen'], ssl_options)

        self.__auth_key = base64.b64encode(config['auth'].encode('utf-8')) if 'auth' in config else None
        # pyright -- ``__listen`` is initially created as ``None``, but right after that it is replaced with a string
        # through :func:`__initialize`.
        if TYPE_CHECKING:  # pragma: no cover
            assert isinstance(self.__listen, str)
        self.connection_string = uri(self.__protocol, config.get('connect_address') or self.__listen, 'patroni')
Reload REST API configuration.

        :param config: dictionary representing values under the ``restapi`` configuration section.

        :raises:
            :class:`ValueError`: if ``listen`` key is not present in *config*.
        
patroni/api.py