diff --git a/src/treaty/index.ts b/src/treaty/index.ts index f918264..9cbe9be 100644 --- a/src/treaty/index.ts +++ b/src/treaty/index.ts @@ -231,7 +231,7 @@ const createProxy = ( if (method === 'SUBSCRIBE') return new EdenWS( url.replace( - /^([^]+):\/\//, + /^([^:]+):\/\//, url.startsWith('https://') ? 'wss://' : 'ws://' ) )