fix: secure
This commit is contained in:
parent
2376b5b1c3
commit
ee68d0414e
|
@ -10,9 +10,6 @@ function onMessage(event) {
|
|||
onmessage = async (event) => {
|
||||
if (!connected) {
|
||||
const url = new URL(`wss://${event.data.host}/ws`)
|
||||
if ('production' === process.env.NODE_ENV) {
|
||||
url.protocol = 'ws:';
|
||||
}
|
||||
socket = new WebSocket(url.href);
|
||||
socket.binaryType = 'arraybuffer';
|
||||
const {promise, resolve} = Promise.withResolvers();
|
||||
|
|
|
@ -26,9 +26,6 @@ export default class RemoteClient extends Client {
|
|||
}
|
||||
else {
|
||||
const url = new URL(`wss://${host}/ws`)
|
||||
if ('production' === process.env.NODE_ENV) {
|
||||
url.protocol = 'ws:';
|
||||
}
|
||||
this.socket = new WebSocket(url.href);
|
||||
this.socket.binaryType = 'arraybuffer';
|
||||
const onMessage = (event) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user