|
@ -735,7 +735,7 @@ func DetermineAdminAPIAddress(address, configFile, configAdapter string) (string |
|
|
return "", fmt.Errorf("no config file to load") |
|
|
return "", fmt.Errorf("no config file to load") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// get the address of the admin listener
|
|
|
// get the address of the admin listener if set
|
|
|
if len(config) > 0 { |
|
|
if len(config) > 0 { |
|
|
var tmpStruct struct { |
|
|
var tmpStruct struct { |
|
|
Admin caddy.AdminConfig `json:"admin"` |
|
|
Admin caddy.AdminConfig `json:"admin"` |
|
@ -744,9 +744,11 @@ func DetermineAdminAPIAddress(address, configFile, configAdapter string) (string |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return "", fmt.Errorf("unmarshaling admin listener address from config: %v", err) |
|
|
return "", fmt.Errorf("unmarshaling admin listener address from config: %v", err) |
|
|
} |
|
|
} |
|
|
|
|
|
if tmpStruct.Admin.Listen != "" { |
|
|
return tmpStruct.Admin.Listen, nil |
|
|
return tmpStruct.Admin.Listen, nil |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Fallback to the default listen address otherwise
|
|
|
// Fallback to the default listen address otherwise
|
|
|
return caddy.DefaultAdminListen, nil |
|
|
return caddy.DefaultAdminListen, nil |
|
|