docs: def add(self,
              routing_entity,
              config: _ConfigType=None):
          """Enable CORS for specific route or resource.
  
          If route is passed CORS is enabled for route's resource.
  
          :param routing_entity:
              Route or Resource for which CORS should be enabled.
          :param config:
              CORS options for the route.
          :return: `routing_entity`.
          """
  
          parsed_config = _parse_config_options(config)
  
          self._router_adapter.add_preflight_handler(
              routing_entity, self._preflight_handler)
          self._router_adapter.set_config_for_routing_entity(
              routing_entity, parsed_config)
  
          return routing_entity