From 60653e12afea1782e7ba351b1b08e94abe1cb236 Mon Sep 17 00:00:00 2001 From: Absurdon Date: Sun, 18 Nov 2018 20:09:48 +0100 Subject: [PATCH] Changing socket-protocol to ws(s) instead of http(s) --- app/javascripts/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascripts/app.js b/app/javascripts/app.js index 7d1978c..9b5cf9a 100644 --- a/app/javascripts/app.js +++ b/app/javascripts/app.js @@ -3,7 +3,7 @@ const ReactDOM = require("react-dom"); const App = require("javascripts/components/main"); const io = require("socket.io-client"); const socketUrl = window.location.protocol + "//" + window.location.host; -const socket = io(socketUrl); +const socket = io(socketUrl.replace(/^http/,'ws')); module.exports = function (mount) { ReactDOM.render(, mount);