Merge pull request #8640 from dokku/8631-caddy-haproxy-traefik-report-global-lacks-raw-key-for-global-properties
Split report global keys into raw and computed
This commit is contained in:
@@ -13,10 +13,13 @@ func getComputedProxyType(appName string) string {
|
||||
if proxyType == "" {
|
||||
proxyType = getGlobalProxyType()
|
||||
}
|
||||
if proxyType == "" {
|
||||
proxyType = "nginx"
|
||||
}
|
||||
|
||||
return proxyType
|
||||
}
|
||||
|
||||
func getGlobalProxyType() string {
|
||||
return common.PropertyGetDefault("proxy", "--global", "type", "nginx")
|
||||
return common.PropertyGet("proxy", "--global", "type")
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
var flags map[string]common.ReportFunc
|
||||
if appName == "--global" {
|
||||
flags = map[string]common.ReportFunc{
|
||||
"--proxy-global-type": reportGlobalType,
|
||||
"--proxy-computed-type": reportComputedType,
|
||||
"--proxy-global-type": reportGlobalType,
|
||||
}
|
||||
} else {
|
||||
flags = map[string]common.ReportFunc{
|
||||
@@ -47,12 +48,7 @@ func reportEnabled(appName string) string {
|
||||
}
|
||||
|
||||
func reportComputedType(appName string) string {
|
||||
proxyType := getGlobalProxyType()
|
||||
if proxyType == "" {
|
||||
proxyType = getAppProxyType(appName)
|
||||
}
|
||||
|
||||
return proxyType
|
||||
return getComputedProxyType(appName)
|
||||
}
|
||||
|
||||
func reportGlobalType(appName string) string {
|
||||
|
||||
Reference in New Issue
Block a user