code: func (s *DefaultService) ServiceConfig() *registrytypes.ServiceConfig {
  	s.mu.Lock()
  	defer s.mu.Unlock()
  
  	servConfig := registrytypes.ServiceConfig{
  		AllowNondistributableArtifactsCIDRs:     make([]*(registrytypes.NetIPNet), 0),
  		AllowNondistributableArtifactsHostnames: make([]string, 0),
  		InsecureRegistryCIDRs:                   make([]*(registrytypes.NetIPNet), 0),
  		IndexConfigs:                            make(map[string]*(registrytypes.IndexInfo)),
  		Mirrors:                                 make([]string, 0),
  	}
  
  	// construct a new ServiceConfig which will not retrieve s.Config directly,
  	// and look up items in s.config with mu locked
  	servConfig.AllowNondistributableArtifactsCIDRs = append(servConfig.AllowNondistributableArtifactsCIDRs, s.config.ServiceConfig.AllowNondistributableArtifactsCIDRs...)
  	servConfig.AllowNondistributableArtifactsHostnames = append(servConfig.AllowNondistributableArtifactsHostnames, s.config.ServiceConfig.AllowNondistributableArtifactsHostnames...)
  	servConfig.InsecureRegistryCIDRs = append(servConfig.InsecureRegistryCIDRs, s.config.ServiceConfig.InsecureRegistryCIDRs...)
  
  	for key, value := range s.config.ServiceConfig.IndexConfigs {
  		servConfig.IndexConfigs[key] = value
  	}
  
  	servConfig.Mirrors = append(servConfig.Mirrors, s.config.ServiceConfig.Mirrors...)
  
  	return &servConfig
  }
docs: // ServiceConfig returns the public registry service configuration.