We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b522a8a commit b4acbb8Copy full SHA for b4acbb8
kiali.go
@@ -187,8 +187,12 @@ func validateConfig() error {
187
}
188
189
validPathRegEx := regexp.MustCompile(`^\/[a-zA-Z\d_/\$]*$`)
190
- if path := config.Get().Server.WebRoot; !validPathRegEx.MatchString(path) {
191
- return fmt.Errorf("web root must begin with a / and contain only alphanumerics: %v", path)
+ webRoot := config.Get().Server.WebRoot
+ if !validPathRegEx.MatchString(webRoot) {
192
+ return fmt.Errorf("web root must begin with a / and contain only alphanumerics: %v", webRoot)
193
+ }
194
+ if webRoot != "/" && strings.HasSuffix(webRoot, "/") {
195
+ return fmt.Errorf("web root must not contain a trailing /: %v", webRoot)
196
197
198
// log some messages to let the administrator know when credentials are configured certain ways
0 commit comments