diff --git a/src/signals/request.ts b/src/signals/request.ts index e3b74b9..6fe0299 100644 --- a/src/signals/request.ts +++ b/src/signals/request.ts @@ -35,4 +35,5 @@ export const endpoint = () => export const secret = () => endpoint()?.secret -export const wsEndpointURL = () => endpoint()?.url.replace('http', 'ws') +export const wsEndpointURL = () => + new URL(endpoint()?.url ?? '').origin.replace('http', 'ws')