mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-23 00:45:53 -05:00
NIP-200: mention about CORS policy
Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
parent
3e201f5352
commit
c6033f7eda
6
200.md
6
200.md
|
@ -10,11 +10,13 @@ This NIP describes the basic of communicating to relays over HTTP(S) requests.
|
|||
|
||||
## Communication between clients and relays
|
||||
|
||||
Relays may expose NoH endpoints that client could reach. Client may make HTTP requests to each relays endpoint for specified tasks as specified in `noh` field at `/.well-known/nostr.json`. Relays MAY limit number of requests from specific IP/Client/etc.
|
||||
Relays may expose NoH endpoints that client could reach. Client may make HTTP requests to each relays endpoint for specified tasks as specified in NIP-11. Relays MAY limit number of requests from specific IP/Client/etc.
|
||||
|
||||
Relays must ensure that the NoH endpoints **MUST** be served with `Access-Control-Allow-Origin: *` header to ensure it can be validated by pure JS apps running in modern browsers.
|
||||
|
||||
### From client to relay: getting events and sending event
|
||||
|
||||
In `noh` field at `/.well-known/nostr.json`, Client could make a request to `req` or `publish` endpoint.
|
||||
Client could make a request to `req` or `publish` endpoint that were specified in `/.well-known/nostr.json`
|
||||
|
||||
When fetching events, Client can optionally specify filters directly into the URI search query:
|
||||
- `<req>?<filter>`
|
||||
|
|
Loading…
Reference in New Issue
Block a user