What is Nostr?
mleku
npub1fjq…leku
2025-02-23 14:01:21

mleku on Nostr: classic example of how retarded the NIP guardians are: ...

classic example of how retarded the NIP guardians are:

https://github.com/nostr-protocol/nips/blob/master/11.md

> When a relay receives an HTTP(s) request with an Accept header of application/nostr+json to a URI supporting WebSocket upgrades, they SHOULD return a document with the following structure.

shouldn't there be a path qualifier as well? does it mean only for the `/` path or does it blanket cover all possible paths?

i'm writing a router for nostr that also handles websocket upgrades for specific paths

but i think that it's "implied" that they mean the root, or whatever path, that you have set your relay to answer to to listen for websockets

so i think i need to switch on paths first and then protocols

but it's not clear

fortunately almost nobody except nostr.wine uses paths at all anyway (and parameters) so i can pretty much say "nostr+json" is always at "/" so if it's not "nostr+json" then it's not asking for nip-11 info

*sigh*

just saying this because the code in relayer purely switches on the Accept header key being "nostr+json" but it should be switching first on "/" and then "nostr+json"

what this nip needs in that paragraph is "for the nostr websocket path"
Author Public Key
npub1fjqqy4a93z5zsjwsfxqhc2764kvykfdyttvldkkkdera8dr78vhsmmleku