diff options
author | Martin Ashby <martin@ashbysoft.com> | 2018-05-17 20:28:12 +0000 |
---|---|---|
committer | Martin Ashby <martin@ashbysoft.com> | 2018-05-17 20:28:12 +0000 |
commit | 375191b516846cbc3c95c5991c86c8f9c388eb3c (patch) | |
tree | 3104bc55322db281d58432fa2c06e3d197fc1933 /src | |
parent | a54ba2ee83320d1ec6f3e43bcd79afe165095c7f (diff) | |
parent | e8215610fda6a39cf57dd19367fe9757597d31e7 (diff) | |
download | unicornpaint-375191b516846cbc3c95c5991c86c8f9c388eb3c.tar.gz unicornpaint-375191b516846cbc3c95c5991c86c8f9c388eb3c.tar.bz2 unicornpaint-375191b516846cbc3c95c5991c86c8f9c388eb3c.tar.xz unicornpaint-375191b516846cbc3c95c5991c86c8f9c388eb3c.zip |
Merge branch 'master' of github.com:MFAshby/unicornpaint
Diffstat (limited to 'src')
-rw-r--r-- | src/App.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -142,8 +142,8 @@ class App extends Component { } _connectWebsocket() { - // this._websocket = new WebSocket('ws://' + window.location.hostname + ':3001/ws') - this._websocket = new WebSocket('ws://shinypi:3001/ws') + let webSocketProto = window.location.protocol === "https" ? "wss" : "ws" + this._websocket = new WebSocket(`${webSocketProto}://${window.location.host}/ws`) this._websocket.onmessage = this._onMessage this._websocket.onopen = this._onOpen this._websocket.onclose = this._onClose |