Fix error connecting to unsecure WebSocket when loading over HTTPS

This commit is contained in:
aPinat 2021-07-16 21:08:16 +00:00
parent b677f422a2
commit 01fc3e1ef5
1 changed files with 1 additions and 1 deletions

View File

@ -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 + '/')