mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-18 06:44:22 +01:00
Include relays in the profile
This commit is contained in:
8
utils.go
8
utils.go
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user