diff --git a/webapp/src/octoListener.ts b/webapp/src/octoListener.ts index 929b19dc6..38f43d60b 100644 --- a/webapp/src/octoListener.ts +++ b/webapp/src/octoListener.ts @@ -44,7 +44,7 @@ class OctoListener { reopenDelay = 3000 constructor(serverUrl?: string, token?: string, readToken?: string) { - this.serverUrl = serverUrl || Utils.buildURL('', true) + this.serverUrl = serverUrl || Utils.buildURL('', true).replace(/\/$/, '') this.token = token || localStorage.getItem('focalboardSessionId') || '' this.readToken = readToken || OctoListener.getReadToken() Utils.log(`OctoListener serverUrl: ${this.serverUrl}`) @@ -66,7 +66,7 @@ class OctoListener { const url = new URL(this.serverUrl) const protocol = (url.protocol === 'https:') ? 'wss:' : 'ws:' - const wsServerUrl = `${protocol}//${url.host}${url.pathname}/ws/onchange` + const wsServerUrl = `${protocol}//${url.host}${url.pathname}ws/onchange` Utils.log(`OctoListener open: ${wsServerUrl}`) const ws = new WebSocket(wsServerUrl) this.ws = ws