lijian 1 年之前
父節點
當前提交
49afb8fc53
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 二進制
      services/emqx-agent/go_build_sparrow_services_emqx_agent
  2. 2 2
      services/httpaccess/actions.go

二進制
services/emqx-agent/go_build_sparrow_services_emqx_agent


+ 2 - 2
services/httpaccess/actions.go

@@ -169,14 +169,14 @@ func AuthDevice(args DeviceAuthArgs, r render.Render) {
 	}
 	}
 
 
 	var hosts []string
 	var hosts []string
-	switch args.Protocol {
+	switch strings.ToLower(args.Protocol) {
 	case "http":
 	case "http":
 		hosts, err = server.GetServerHosts(strings.ToUpper(args.Protocol)+"Access", "httphost")
 		hosts, err = server.GetServerHosts(strings.ToUpper(args.Protocol)+"Access", "httphost")
 	case "mqtt":
 	case "mqtt":
 		hosts, err = server.GetServerHosts(strings.ToUpper(args.Protocol)+"Access", "tcphost")
 		hosts, err = server.GetServerHosts(strings.ToUpper(args.Protocol)+"Access", "tcphost")
 	case "coap":
 	case "coap":
 		hosts, err = server.GetServerHosts(strings.ToUpper(args.Protocol)+"Access", "udphost")
 		hosts, err = server.GetServerHosts(strings.ToUpper(args.Protocol)+"Access", "udphost")
-	case "mqttX": // TODO: 增加配置文件支持
+	case "mqttx": // TODO: 增加配置文件支持
 		hosts = []string{
 		hosts = []string{
 			"114.115.251.196:1883",
 			"114.115.251.196:1883",
 		}
 		}