Fix error connecting to unsecure WebSocket when loading over HTTPS
This commit is contained in:
parent
b677f422a2
commit
01fc3e1ef5
@ -34,4 +34,4 @@ class CustomSocket extends WebSocket {
|
||||
}
|
||||
}
|
||||
|
||||
export const socket = new CustomSocket('ws://' + location.host + '/')
|
||||
export const socket = new CustomSocket((location.protocol === 'https:' ? 'wss://' : 'ws://') + location.host + '/')
|
||||
|
Loading…
Reference in New Issue
Block a user