diff --git a/webapp/src/octoListener.ts b/webapp/src/octoListener.ts index 32ade418b..32599195e 100644 --- a/webapp/src/octoListener.ts +++ b/webapp/src/octoListener.ts @@ -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