support serving web interface via https proxy

This commit is contained in:
Tyler Ball 2019-01-15 13:46:37 -05:00 committed by chme
parent 99b0b644a9
commit 0da24a3f90
1 changed files with 6 additions and 1 deletions

View File

@ -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 }
)