From 938da2a16ffb0fda91bb70d39f80745adf5f7223 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Wed, 20 May 2020 13:29:44 +0300
Subject: [PATCH] Fix for bad ws host

---
 web-service/public/js/bundle.js | 4 ++--
 web-service/public/js/index.js  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/web-service/public/js/bundle.js b/web-service/public/js/bundle.js
index 2c34cbe04..b26b56a29 100644
--- a/web-service/public/js/bundle.js
+++ b/web-service/public/js/bundle.js
@@ -109,8 +109,8 @@ createCard = (url, viewers) => {
 
 createPeer = () => {
     // FOR PRODUCTION
-    //const ws = new WebSocket("ws://" + location.host + ":" + (location.port == "" ? "80" : location.port) + location.pathname);
-    const ws = new WebSocket("ws://localhost:8080")
+    const ws = new WebSocket("ws://" + location.host + ":" + (location.port == "" ? "80" : location.port) + location.pathname);
+    //const ws = new WebSocket("ws://localhost:8080")
     ws.binaryType = "arraybuffer";
     peer = new Peer(ws)
 }
diff --git a/web-service/public/js/index.js b/web-service/public/js/index.js
index 3f53e3d5a..3f9093481 100644
--- a/web-service/public/js/index.js
+++ b/web-service/public/js/index.js
@@ -107,8 +107,8 @@ createCard = (url, viewers) => {
 
 createPeer = () => {
     // FOR PRODUCTION
-    //const ws = new WebSocket("ws://" + location.host + ":" + (location.port == "" ? "80" : location.port) + location.pathname);
-    const ws = new WebSocket("ws://localhost:8080")
+    const ws = new WebSocket("ws://" + location.host + ":" + (location.port == "" ? "80" : location.port) + location.pathname);
+    //const ws = new WebSocket("ws://localhost:8080")
     ws.binaryType = "arraybuffer";
     peer = new Peer(ws)
 }
-- 
GitLab