aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ashby <martin@ashbysoft.com>2018-05-17 20:28:12 +0000
committerMartin Ashby <martin@ashbysoft.com>2018-05-17 20:28:12 +0000
commit375191b516846cbc3c95c5991c86c8f9c388eb3c (patch)
tree3104bc55322db281d58432fa2c06e3d197fc1933
parenta54ba2ee83320d1ec6f3e43bcd79afe165095c7f (diff)
parente8215610fda6a39cf57dd19367fe9757597d31e7 (diff)
downloadunicornpaint-375191b516846cbc3c95c5991c86c8f9c388eb3c.tar.gz
unicornpaint-375191b516846cbc3c95c5991c86c8f9c388eb3c.tar.bz2
unicornpaint-375191b516846cbc3c95c5991c86c8f9c388eb3c.tar.xz
unicornpaint-375191b516846cbc3c95c5991c86c8f9c388eb3c.zip
Merge branch 'master' of github.com:MFAshby/unicornpaint
-rw-r--r--src/App.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/App.js b/src/App.js
index 98611b2..fe5a100 100644
--- a/src/App.js
+++ b/src/App.js
@@ -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