fix: secure

This commit is contained in:
cha0s 2024-06-28 18:04:23 -05:00
parent 2376b5b1c3
commit ee68d0414e
2 changed files with 0 additions and 6 deletions

View File

@ -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();

View File

@ -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) => {