mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-04 01:19:20 +08:00 
			
		
		
		
	caddyfile: Support global config block; allow non-empty blocks w/ 0 keys
This commit is contained in:
		@ -131,9 +131,8 @@ func loadConfig(configFile, adapterName string) ([]byte, error) {
 | 
			
		||||
 | 
			
		||||
	// adapt config
 | 
			
		||||
	if cfgAdapter != nil {
 | 
			
		||||
		adaptedConfig, warnings, err := cfgAdapter.Adapt(config, map[string]string{
 | 
			
		||||
		adaptedConfig, warnings, err := cfgAdapter.Adapt(config, map[string]interface{}{
 | 
			
		||||
			"filename": configFile,
 | 
			
		||||
			// TODO: all other options... (http-port, etc...)
 | 
			
		||||
		})
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return nil, fmt.Errorf("adapting config using %s: %v", adapterName, err)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user