summaryrefslogtreecommitdiff
path: root/src/views/_sila/Operations/SerialOverLan
diff options
context:
space:
mode:
authorAlexandr Ilenko <AIlenko@IBS.RU>2022-08-22 18:33:14 +0300
committerAlexandr Ilenko <AIlenko@IBS.RU>2022-08-30 10:46:01 +0300
commit788f3f3566bea46a164ed8ed68b39f69344fc65e (patch)
tree893ae3b39eec0679d41a0cb2136dafa8f0bcfab1 /src/views/_sila/Operations/SerialOverLan
parent89f53857e6377828cccf81ca3fefce3bd6f7557c (diff)
downloadwebui-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.vue6
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.