server hostnames
This commit is contained in:
@@ -153,7 +153,8 @@ private func syncError(_ error: (any Error)?) -> String {
|
||||
|
||||
func serverName(_ origin: String) -> String {
|
||||
let host = URL(string: origin)?.host() ?? origin
|
||||
return host.split(separator: ".").first.map(String.init) ?? host
|
||||
let node = host.split(separator: ".").first.map(String.init) ?? host
|
||||
return node.hasPrefix("byre-") ? String(node.dropFirst(5)) : node
|
||||
}
|
||||
|
||||
@MainActor
|
||||
|
||||
Reference in New Issue
Block a user