Merge pull request #3698 from owncloud/adoc-fixes

prepend http by  in adoc generator
This commit is contained in:
Jörn Friedrich Dreyer
2022-05-05 13:08:43 +00:00
committed by GitHub

View File

@@ -7,6 +7,7 @@ import (
"os"
"path/filepath"
"reflect"
"regexp"
"strings"
"text/template"
@@ -88,6 +89,8 @@ func GetAnnotatedVariables(s interface{}) []ConfigField {
}
v := fmt.Sprintf("%v", value.Interface())
td := strings.Split(env, ";")
re := regexp.MustCompile(`^(https?:\/\/)`)
v = re.ReplaceAllString(v,"\\$1")
fields = append(fields, ConfigField{EnvVars: td, DefaultValue: v, Description: desc, Type: value.Type().Name()})
case reflect.Ptr:
// PolicySelectors in the Proxy are being skipped atm