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:45:55 +0300 |
commit | 89f53857e6377828cccf81ca3fefce3bd6f7557c (patch) | |
tree | 37a0bafb17e702e1f843795527721755d9033e5c /src/views/_ibs/Operations/Kvm | |
parent | f47ddcfeaa957dd6571b35e6ba7b761892f186db (diff) | |
download | webui-vue-89f53857e6377828cccf81ca3fefce3bd6f7557c.tar.xz |
[SILABMC-280] Fix: use wsS only when httpS
Diffstat (limited to 'src/views/_ibs/Operations/Kvm')
-rw-r--r-- | src/views/_ibs/Operations/Kvm/KvmConsole.vue | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/views/_ibs/Operations/Kvm/KvmConsole.vue b/src/views/_ibs/Operations/Kvm/KvmConsole.vue index c671a4b9..69fce099 100644 --- a/src/views/_ibs/Operations/Kvm/KvmConsole.vue +++ b/src/views/_ibs/Operations/Kvm/KvmConsole.vue @@ -105,12 +105,10 @@ export default { this.rfb = null; }, openTerminal() { + const url = new URL('/kvm/0', window.location.href); + url.protocol = url.protocol.replace('http', 'ws'); const token = this.$store.getters['authentication/token']; - this.rfb = new RFB( - this.$refs.panel, - `wss://${window.location.host}/kvm/0`, - { wsProtocols: [token] } - ); + this.rfb = new RFB(this.$refs.panel, url, { wsProtocols: [token] }); this.rfb.scaleViewport = true; this.rfb.clipViewport = true; |