Fix bug connecting to secure msgbus (websocket) endpoints
This commit is contained in:
bovenliggende
7402386c08
commit
95e5e36662
|
@ -224,7 +224,12 @@ func (s *Subscriber) Run() {
|
|||
log.Fatal("invalid url: %s", s.client.url)
|
||||
}
|
||||
|
||||
u.Scheme = "ws"
|
||||
if strings.HasPrefix(s.client.url, "https") {
|
||||
u.Scheme = "wss"
|
||||
} else {
|
||||
u.Scheme = "ws"
|
||||
}
|
||||
|
||||
u.Path += fmt.Sprintf("/%s", s.topic)
|
||||
|
||||
url := u.String()
|
||||
|
|
Laden…
Verwijs in nieuw issue