From 3f117cddfa4ea7f5d7c2b39aa40692cbb6b83c5e Mon Sep 17 00:00:00 2001 From: Jasder <2053003901@@qq.com> Date: Thu, 2 Jul 2020 18:22:54 +0800 Subject: [PATCH] FIX websocket wss location bug --- src/forge/Main/Detail.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 32b50161..fb67b99d 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -196,11 +196,11 @@ class Detail extends Component { }) } canvasChannel = () => { - const name = window.location.hostname === "localhost" ? "http://testforgeplus.trustie.net":window.location.hostname; - console.log(`wss:${name}/cable`); + const name = window.location.hostname === "localhost" ? "testforgeplus.trustie.net":window.location.hostname; + console.log(`wss://${name}/cable`); const actioncable = require("actioncable") var project = this.state.project - var cable = actioncable.createConsumer(`wss:${name}/cable`); + var cable = actioncable.createConsumer(`wss://${name}/cable`); this.canvasChannel1 = cable.subscriptions.create({ channel: `MirrorProjectChannel`, id: project && project.identifier