From d2a1a74a1cdfc9003f9d23f492954810dca0429e Mon Sep 17 00:00:00 2001 From: koalasat Date: Tue, 20 May 2025 14:07:37 +0200 Subject: [PATCH] Check protocol --- frontend/src/services/RoboPool/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/services/RoboPool/index.ts b/frontend/src/services/RoboPool/index.ts index c255da59..25f13bac 100644 --- a/frontend/src/services/RoboPool/index.ts +++ b/frontend/src/services/RoboPool/index.ts @@ -19,7 +19,8 @@ class RoboPool { ); if (settings.host) { - const hostNostr = `ws://${settings.host.replace(/^https?:\/\//, '')}/relay/`; + const protocol = hostUrl.includes('https') ? 'wss' : 'ws'; + const hostNostr = `${protocol}://${settings.host.replace(/^https?:\/\//, '')}/relay/`; if (federationRelays.includes(hostNostr)) { this.relays.push(hostNostr); }