From c6033f7eda65e16216ca0fedf3cee4ecde566957 Mon Sep 17 00:00:00 2001 From: Yonle Date: Fri, 5 Jan 2024 22:31:00 +0700 Subject: [PATCH] NIP-200: mention about CORS policy Signed-off-by: Yonle --- 200.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/200.md b/200.md index 212736b..3d8abb1 100644 --- a/200.md +++ b/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: - `?`