ipc: allow wss
This commit is contained in:
parent
914b76d0f0
commit
4701373052
1 changed files with 3 additions and 2 deletions
|
|
@ -10,7 +10,8 @@ setTimeout(()=>{
|
|||
|
||||
var reconnectInterval = 5000,
|
||||
hearbeatInterval = 25000,
|
||||
hearbeatTimeout = 5000
|
||||
hearbeatTimeout = 5000,
|
||||
protocol = document.location.protocol === 'https:' ? 'wss://' : 'ws://'
|
||||
|
||||
class Ipc extends EventEmitter {
|
||||
|
||||
|
|
@ -58,7 +59,7 @@ class Ipc extends EventEmitter {
|
|||
|
||||
open() {
|
||||
|
||||
this.socket = new WebSocket('ws://' + window.location.host + '/' + uuid)
|
||||
this.socket = new WebSocket(protocol + window.location.host + '/' + uuid)
|
||||
|
||||
this.socket.onopen = (e)=>{
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue