From f7b4cc8a7104bc2739204400d06f2b06bc34ba59 Mon Sep 17 00:00:00 2001
From: Jonas Leder <jonas@jonasled.de>
Date: Thu, 21 Apr 2022 21:34:37 +0200
Subject: [PATCH] fix ws with https

---
 app/utils/host.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/utils/host.js b/app/utils/host.js
index 384ece6..0d07dbb 100644
--- a/app/utils/host.js
+++ b/app/utils/host.js
@@ -31,7 +31,8 @@ function ws_base_url() {
   /*
   websockets base url
   */
-  let base = `ws://${window.location.host}`;
+  let wsType = window.location.protocol == "https:" ? "wss" : "ws";
+  let base = `${wsType}://${window.location.host}`;
 
   if (ENV.APP.WS_HOST) {
     // user can override BACKEND HOST by providing
-- 
GitLab