void HttpConnectionManagerConfig::processDynamicFilterConfig(
    const std::string& name, const envoy::config::core::v3::ExtensionConfigSource& config_discovery,
    FilterFactoriesList& filter_factories, const std::string& filter_chain_type,
    bool last_filter_in_current_config) {
  ENVOY_LOG(debug, "      dynamic filter name: {}", name);
  if (config_discovery.apply_default_config_without_warming() &&
      !config_discovery.has_default_config()) {
    throw EnvoyException(fmt::format(
        "Error: filter config {} applied without warming but has no default config.", name));
  }
  for (const auto& type_url : config_discovery.type_urls()) {
    auto factory_type_url = TypeUtil::typeUrlToDescriptorFullName(type_url);
    auto* factory = Registry::FactoryRegistry<
        Server::Configuration::NamedHttpFilterConfigFactory>::getFactoryByType(factory_type_url);
    if (factory == nullptr) {
      throw EnvoyException(
          fmt::format("Error: no factory found for a required type URL {}.", factory_type_url));
    }
  }

  auto filter_config_provider = filter_config_provider_manager_.createDynamicFilterConfigProvider(
      config_discovery, name, context_, stats_prefix_, last_filter_in_current_config,
      filter_chain_type);
  filter_factories.push_back(std::move(filter_config_provider));
}
void HttpConnectionManagerConfig::processDynamicFilterConfig(
    const std::string& name, const envoy::config::core::v3::ExtensionConfigSource& config_discovery,
    FilterFactoriesList& filter_factories, const std::string& filter_chain_type,
    bool last_filter_in_current_config) {
  ENVOY_LOG(debug, "      dynamic filter name: {}", name);
  if (config_discovery.apply_default_config_without_warming() &&
      !config_discovery.has_default_config()) {
    throw EnvoyException(fmt::format(
        "Error: filter config {} applied without warming but has no default config.", name));
  }
  for (const auto& type_url : config_discovery.type_urls()) {
    auto factory_type_url = TypeUtil::typeUrlToDescriptorFullName(type_url);
    auto* factory = Registry::FactoryRegistry<
        Server::Configuration::NamedHttpFilterConfigFactory>::getFactoryByType(factory_type_url);
    if (factory == nullptr) {
      throw EnvoyException(
          fmt::format("Error: no factory found for a required type URL {}.", factory_type_url));
    }
  }

  auto filter_config_provider = filter_config_provider_manager_.createDynamicFilterConfigProvider(
      config_discovery, name, context_, stats_prefix_, last_filter_in_current_config,
      filter_chain_type);
  filter_factories.push_back(std::move(filter_config_provider));
}