feat: implement global support for setting proxy type

This commit is contained in:
Jose Diaz-Gonzalez
2024-01-19 04:13:55 -05:00
parent ea28367689
commit 7fbb86093b
6 changed files with 73 additions and 8 deletions

View File

@@ -5,5 +5,18 @@ import (
)
func getAppProxyType(appName string) string {
return config.GetWithDefault(appName, "DOKKU_APP_PROXY_TYPE", "nginx")
return config.GetWithDefault(appName, "DOKKU_APP_PROXY_TYPE", "")
}
func getComputedProxyType(appName string) string {
proxyType := getGlobalProxyType()
if proxyType == "" {
proxyType = getAppProxyType(appName)
}
return proxyType
}
func getGlobalProxyType() string {
return config.GetWithDefault("--global", "DOKKU_PROXY_TYPE", "nginx")
}