diff options
Diffstat (limited to 'src/views/_sila/Operations/Kvm/KvmConsole.vue')
-rw-r--r-- | src/views/_sila/Operations/Kvm/KvmConsole.vue | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/views/_sila/Operations/Kvm/KvmConsole.vue b/src/views/_sila/Operations/Kvm/KvmConsole.vue index 603aa115..b4fddb9d 100644 --- a/src/views/_sila/Operations/Kvm/KvmConsole.vue +++ b/src/views/_sila/Operations/Kvm/KvmConsole.vue @@ -111,12 +111,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; |