1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-27 13:48:49 +08:00

NOISSUE - Use current hostname instead of localhost for a WebSocket connection in the UI (#826)

Signed-off-by: Alexander Obukhov <dev@sprql.space>
This commit is contained in:
Alexander Obukhov 2019-08-30 15:21:29 +03:00 committed by Ivan Milošević
parent f090573567
commit 1a4844cee1

View File

@ -6,7 +6,7 @@ MF.log = function(msg) {
}
MF.url = function(data) {
return 'wss://localhost/ws/channels/' + data.channelid + '/messages?authorization=' + data.thingkey
return 'wss://' + window.location.hostname + '/ws/channels/' + data.channelid + '/messages?authorization=' + data.thingkey
}
app.ports.connectWebsocket.subscribe(function(data) {