Use wss for https connections
This commit is contained in:
parent
2dd7848b9b
commit
4f3eb7239e
|
@ -53,7 +53,8 @@ class OctoListener {
|
|||
this.onChange = onChange
|
||||
|
||||
const url = new URL(this.serverUrl)
|
||||
const wsServerUrl = `ws://${url.host}${url.pathname}ws/onchange`
|
||||
const scheme = (url.protocol === 'https') ? 'wss' : 'ws'
|
||||
const wsServerUrl = `${scheme}://${url.host}${url.pathname}ws/onchange`
|
||||
Utils.log(`OctoListener open: ${wsServerUrl}`)
|
||||
const ws = new WebSocket(wsServerUrl)
|
||||
this.ws = ws
|
||||
|
|
Loading…
Reference in New Issue
Block a user