From 4c3d91e2f2f6ec752b5fcf6bbc8b7167c6399a25 Mon Sep 17 00:00:00 2001 From: elliotwaite <1767836+elliotwaite@users.noreply.github.com> Date: Sat, 10 Feb 2024 20:27:02 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix(treaty):=20Fix=20regex=20for?= =?UTF-8?q?=20replacing=20http(s)=20with=20ws(s)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/treaty/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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://' ) )