MCPcopy Index your code
hub / github.com/cameri/nostream / isRelayUrlMatch

Method isRelayUrlMatch

src/handlers/auth-message-handler.ts:77–85  ·  view source on GitHub ↗
(clientRelay: string, serverRelay: string)

Source from the content-addressed store, hash-verified

75
76 // NIP-42 says domain-match is sufficient for relay URL comparison
77 private isRelayUrlMatch(clientRelay: string, serverRelay: string): boolean {
78 try {
79 const clientHost = new URL(clientRelay).hostname.toLowerCase()
80 const serverHost = new URL(serverRelay).hostname.toLowerCase()
81 return clientHost === serverHost
82 } catch {
83 return false
84 }
85 }
86}

Callers 1

handleMessageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected