Skip to content
Snippets Groups Projects
Unverified Commit ebd91cff authored by Hans Moog's avatar Hans Moog Committed by GitHub
Browse files

Merge pull request #83 from Evanfeenstra/ui

fix ws/wss for https://
parents e7069df3 01db9334
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 }
......
......@@ -46,14 +46,8 @@ func configure(plugin *node.Plugin) {
}()
}))
node.DEFAULT_LOGGER.SetEnabled(false)
uiLogger.SetEnabled(true)
plugin.Node.AddLogger(uiLogger)
daemon.Events.Shutdown.Attach(events.NewClosure(func() {
node.DEFAULT_LOGGER.SetEnabled(true)
}))
}
func staticFileServer(c echo.Context) error {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment