diff --git a/src/utils/socket.js b/src/utils/socket.js index c3c1072..7f56ce6 100644 --- a/src/utils/socket.js +++ b/src/utils/socket.js @@ -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 + '/')