Skip to content
Snippets Groups Projects
Commit fef55a48 authored by Evan Feenstra's avatar Evan Feenstra
Browse files

fix ws/wss for https://

parent 383198c0
Branches
Tags
No related merge requests found
...@@ -494,8 +494,12 @@ Vue.component('empty-icon', { ...@@ -494,8 +494,12 @@ Vue.component('empty-icon', {
this.show() this.show()
this.loggedIn = true this.loggedIn = true
this.selectedTab = 'Logs' this.selectedTab = 'Logs'
let wsProtocol = 'wss:'
if (location.protocol != 'https:') {
wsProtocol = 'ws:'
}
this.ws = new WebSocket( this.ws = new WebSocket(
api.addToken('ws://'+window.location.host+'/ws') api.addToken(wsProtocol+'//'+window.location.host+'/ws')
) )
this.ws.onopen = (e) => { this.connected=true } this.ws.onopen = (e) => { this.connected=true }
this.ws.onclose = (e) => { this.connected=false } this.ws.onclose = (e) => { this.connected=false }
......
...@@ -34,8 +34,12 @@ new Vue({ ...@@ -34,8 +34,12 @@ new Vue({
this.show() this.show()
this.loggedIn = true this.loggedIn = true
this.selectedTab = 'Logs' this.selectedTab = 'Logs'
let wsProtocol = 'wss:'
if (location.protocol != 'https:') {
wsProtocol = 'ws:'
}
this.ws = new WebSocket( this.ws = new WebSocket(
api.addToken('ws://'+window.location.host+'/ws') api.addToken(wsProtocol+'//'+window.location.host+'/ws')
) )
this.ws.onopen = (e) => { this.connected=true } this.ws.onopen = (e) => { this.connected=true }
this.ws.onclose = (e) => { this.connected=false } this.ws.onclose = (e) => { this.connected=false }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment