From 5384ff14e2317360fa38ee63cef5ba0809b1f85f Mon Sep 17 00:00:00 2001 From: Anish Mukherjee Date: Thu, 10 Nov 2022 18:45:14 +0530 Subject: [PATCH] update server connection --- servercfg/serverconf.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/servercfg/serverconf.go b/servercfg/serverconf.go index 58d8b601..aa78fb85 100644 --- a/servercfg/serverconf.go +++ b/servercfg/serverconf.go @@ -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 }