Browse Source

update server connection

Anish Mukherjee 2 years ago
parent
commit
5384ff14e2
1 changed files with 5 additions and 0 deletions
  1. 5 0
      servercfg/serverconf.go

+ 5 - 0
servercfg/serverconf.go

@@ -236,6 +236,11 @@ func GetMessageQueueEndpoint() (string, bool) {
 		host = config.Config.Server.MQHOST
 		host = config.Config.Server.MQHOST
 	}
 	}
 	secure := strings.Contains(host, "wss") || strings.Contains(host, "ssl")
 	secure := strings.Contains(host, "wss") || strings.Contains(host, "ssl")
+	if secure {
+		host = "wss://" + host
+	} else {
+		host = "ws://" + host
+	}
 	return host + ":" + GetMQServerPort(), secure
 	return host + ":" + GetMQServerPort(), secure
 }
 }