From cb5ffadcba33e8aab57993027a6785766511102a Mon Sep 17 00:00:00 2001 From: slice Date: Wed, 18 Jul 2018 11:51:00 -0700 Subject: [PATCH] support http doamin --- priv/frontend/src/components/App.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/priv/frontend/src/components/App.js b/priv/frontend/src/components/App.js index 79dce85..f07231c 100644 --- a/priv/frontend/src/components/App.js +++ b/priv/frontend/src/components/App.js @@ -113,7 +113,10 @@ export default class App extends Component { connect () { log('connecting to ws') - const endpoint = (`${DOMAIN}/api/streaming`).replace('https', 'wss') + const endpoint = `${DOMAIN}/api/streaming` + .replace('https', 'wss') + .replace('http', 'ws') + this.websocket = new WebSocket(endpoint) this.websocket.onopen = () => {