Include relays in the profile

This commit is contained in:
Daniele Tonon
2023-07-14 11:09:14 +02:00
parent b688f0ff41
commit df83b221a4
6 changed files with 57 additions and 10 deletions

View File

@@ -335,4 +335,12 @@ func unique(strSlice []string) []string {
}
}
return list
}
func trimProtocol(relay string) string {
relay = strings.TrimPrefix(relay, "wss://")
relay = strings.TrimPrefix(relay, "ws://")
relay = strings.TrimPrefix(relay, "wss:/") // Some browsers replace upfront '//' with '/'
relay = strings.TrimPrefix(relay, "ws:/") // Some browsers replace upfront '//' with '/'
return relay
}