diff options
author | Alexandr Ilenko <AIlenko@IBS.RU> | 2022-08-22 18:33:14 +0300 |
---|---|---|
committer | Alexandr Ilenko <AIlenko@IBS.RU> | 2022-08-30 10:46:01 +0300 |
commit | 788f3f3566bea46a164ed8ed68b39f69344fc65e (patch) | |
tree | 893ae3b39eec0679d41a0cb2136dafa8f0bcfab1 /src/views/_sila/Operations/SerialOverLan | |
parent | 89f53857e6377828cccf81ca3fefce3bd6f7557c (diff) | |
download | webui-vue-788f3f3566bea46a164ed8ed68b39f69344fc65e.tar.xz |
[SILABMC-280] Fix: use wsS only when httpSsila-fix/fix-SILABMC-172
Diffstat (limited to 'src/views/_sila/Operations/SerialOverLan')
-rw-r--r-- | src/views/_sila/Operations/SerialOverLan/SerialOverLanConsole.vue | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/views/_sila/Operations/SerialOverLan/SerialOverLanConsole.vue b/src/views/_sila/Operations/SerialOverLan/SerialOverLanConsole.vue index b1087805..3b51fc56 100644 --- a/src/views/_sila/Operations/SerialOverLan/SerialOverLanConsole.vue +++ b/src/views/_sila/Operations/SerialOverLan/SerialOverLanConsole.vue @@ -91,9 +91,9 @@ export default { openTerminal() { const token = this.$store.getters['authentication/token']; - this.ws = new WebSocket(`wss://${window.location.host}/console0`, [ - token, - ]); + const url = new URL('/console0', window.location.href); + url.protocol = url.protocol.replace('http', 'ws'); + this.ws = new WebSocket(url, [token]); // Refer https://github.com/xtermjs/xterm.js/ for xterm implementation and addons. |