Skip to content

Commit 49147b2

Browse files
committed
make websocket connection working with SSL
1 parent a49ac41 commit 49147b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/linuxDash.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
*/
6666
var establishWebsocketConnection = function() {
6767

68-
var websocketUrl = 'ws://' + window.location.hostname + ':' + window.location.port;
68+
var websocketUrl = (location.protocol === 'https:' ? 'wss://' : 'ws://') + window.location.hostname + ':' + window.location.port;
6969

7070
if (websocket.connection === null) {
7171

0 commit comments

Comments
 (0)