Skip to content

Commit cabd0e3

Browse files
committed
fix: all config plugin name to lowcase
1 parent 2034f06 commit cabd0e3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

api_config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ func (s *Server) api_Config_YAML_All(rw http.ResponseWriter, r *http.Request) {
143143

144144
// 3. Process plugin configs.
145145
for _, meta := range plugins {
146-
if filterName != "" && meta.Name != filterName {
146+
if filterName != "" && !strings.EqualFold(meta.Name, filterName) {
147147
continue
148148
}
149-
149+
name := strings.ToLower(meta.Name)
150150
configType := meta.Type
151151
if configType.Kind() == reflect.Ptr {
152152
configType = configType.Elem()
@@ -168,12 +168,12 @@ func (s *Server) api_Config_YAML_All(rw http.ResponseWriter, r *http.Request) {
168168
configSections = append(configSections, struct {
169169
name string
170170
data any
171-
}{meta.Name, mergedConf})
171+
}{name, mergedConf})
172172
} else {
173173
configSections = append(configSections, struct {
174174
name string
175175
data any
176-
}{meta.Name, pluginConf})
176+
}{name, pluginConf})
177177
}
178178
}
179179
}

0 commit comments

Comments
 (0)