forked from platypush/platypush
Added SSL to websockets js code as well
This commit is contained in:
parent
727b604bb4
commit
3eed774d50
1 changed files with 2 additions and 1 deletions
|
@ -9,7 +9,8 @@ $(document).ready(function() {
|
|||
|
||||
var initWebsocket = function() {
|
||||
try {
|
||||
websocket = new WebSocket('ws://' + window.location.hostname + ':' + window.websocket_port);
|
||||
url_prefix = window.ssl_cert ? 'wss://' : 'ws://';
|
||||
websocket = new WebSocket(url_prefix + window.location.hostname + ':' + window.websocket_port);
|
||||
} catch (err) {
|
||||
websocket = undefined;
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue