feat: default to wss:// when URL has no protocol
This commit is contained in:
parent
14eee0240b
commit
be7081359d
1 changed files with 1 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ export function RelaySettingsProvider({ children }: { children: React.ReactNode
|
||||||
const searchParams = new URLSearchParams(window.location.search)
|
const searchParams = new URLSearchParams(window.location.search)
|
||||||
const tempRelays = searchParams
|
const tempRelays = searchParams
|
||||||
.getAll('r')
|
.getAll('r')
|
||||||
|
.map((url) => (url.startsWith('wss://') || url.startsWith('ws://') ? url : `wss://${url}`))
|
||||||
.filter((url) => isWebsocketUrl(url))
|
.filter((url) => isWebsocketUrl(url))
|
||||||
.map((url) => normalizeUrl(url))
|
.map((url) => normalizeUrl(url))
|
||||||
if (tempRelays.length) {
|
if (tempRelays.length) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue