update server connection

This commit is contained in:
Anish Mukherjee 2022-11-10 18:45:14 +05:30
parent bdb221e32d
commit 5384ff14e2

View file

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