From 0da24a3f90d47e5feddecea1d16335429bab445a Mon Sep 17 00:00:00 2001 From: Tyler Ball Date: Tue, 15 Jan 2019 13:46:37 -0500 Subject: [PATCH] support serving web interface via https proxy --- web-src/src/App.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web-src/src/App.vue b/web-src/src/App.vue index 0bdddd40..2286733d 100644 --- a/web-src/src/App.vue +++ b/web-src/src/App.vue @@ -86,8 +86,13 @@ export default { const vm = this + var protocol = 'ws://' + if (window.location.protocol === 'https:') { + protocol = 'wss://' + } + var socket = new ReconnectingWebSocket( - 'ws://' + window.location.hostname + ':' + vm.$store.state.config.websocket_port, + protocol + window.location.hostname + ':' + vm.$store.state.config.websocket_port, 'notify', { reconnectInterval: 3000 } )