code: func isSecureIndex(config *serviceConfig, indexName string) bool {
  	// Check for configured index, first.  This is needed in case isSecureIndex
  	// is called from anything besides newIndexInfo, in order to honor per-index configurations.
  	if index, ok := config.IndexConfigs[indexName]; ok {
  		return index.Secure
  	}
  
  	return !isCIDRMatch(config.InsecureRegistryCIDRs, indexName)
  }
docs: // isSecureIndex returns false if the provided indexName is part of the list of insecure registries
  // Insecure registries accept HTTP and/or accept HTTPS with certificates from unknown CAs.
  //
  // The list of insecure registries can contain an element with CIDR notation to specify a whole subnet.
  // If the subnet contains one of the IPs of the registry specified by indexName, the latter is considered
  // insecure.
  //
  // indexName should be a URL.Host (`host:port` or `host`) where the `host` part can be either a domain name
  // or an IP address. If it is a domain name, then it will be resolved in order to check if the IP is contained
  // in a subnet. If the resolving is not successful, isSecureIndex will only try to match hostname to any element
  // of insecureRegistries.