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
No related branches found
No related tags found
No related merge requests found
......@@ -494,8 +494,12 @@ Vue.component('empty-icon', {
this.show()
this.loggedIn = true
this.selectedTab = 'Logs'
let wsProtocol = 'wss:'
if (location.protocol != 'https:') {
wsProtocol = 'ws:'
}
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.onclose = (e) => { this.connected=false }
......
......@@ -34,8 +34,12 @@ new Vue({
this.show()
this.loggedIn = true
this.selectedTab = 'Logs'
let wsProtocol = 'wss:'
if (location.protocol != 'https:') {
wsProtocol = 'ws:'
}
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.onclose = (e) => { this.connected=false }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment