forked from Gitlink/forgeplus-react
FIX websocket wss location bug
This commit is contained in:
parent
a037820905
commit
3f117cddfa
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue