This commit is contained in:
caishi 2020-07-02 17:03:28 +08:00
parent 09b05a1f3d
commit 47e04190ca
1 changed files with 2 additions and 2 deletions

View File

@ -197,10 +197,10 @@ class Detail extends Component {
}
canvasChannel = () => {
const name = window.location.hostname === "localhost" ? "http://testforgeplus.trustie.net":window.location.hostname;
console.log(`ws:${name}/cable`);
console.log(`wss:${name}/cable`);
const actioncable = require("actioncable")
var project = this.state.project
var cable = actioncable.createConsumer(`ws:${name}/cable`);
var cable = actioncable.createConsumer(`wss:${name}/cable`);
this.canvasChannel1 = cable.subscriptions.create({
channel: `MirrorProjectChannel`,
id: project && project.identifier