fix: all config plugin name to lowcase

This commit is contained in:
langhuihui
2025-08-19 17:29:32 +08:00
parent 2034f068c0
commit cabd0e3088

View File

@@ -143,10 +143,10 @@ func (s *Server) api_Config_YAML_All(rw http.ResponseWriter, r *http.Request) {
// 3. Process plugin configs. // 3. Process plugin configs.
for _, meta := range plugins { for _, meta := range plugins {
if filterName != "" && meta.Name != filterName { if filterName != "" && !strings.EqualFold(meta.Name, filterName) {
continue continue
} }
name := strings.ToLower(meta.Name)
configType := meta.Type configType := meta.Type
if configType.Kind() == reflect.Ptr { if configType.Kind() == reflect.Ptr {
configType = configType.Elem() configType = configType.Elem()
@@ -168,12 +168,12 @@ func (s *Server) api_Config_YAML_All(rw http.ResponseWriter, r *http.Request) {
configSections = append(configSections, struct { configSections = append(configSections, struct {
name string name string
data any data any
}{meta.Name, mergedConf}) }{name, mergedConf})
} else { } else {
configSections = append(configSections, struct { configSections = append(configSections, struct {
name string name string
data any data any
}{meta.Name, pluginConf}) }{name, pluginConf})
} }
} }
} }