diff --git a/app/utils/host.js b/app/utils/host.js index 384ece6c22380d32f7882b87afd094b08636c978..0d07dbbf3ba4e1c0a6cdae258116e3e0e152ed1d 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