diff options
| author | Luke Childs <lukechilds123@gmail.com> | 2023-01-06 19:37:55 +0700 |
|---|---|---|
| committer | fiatjaf <fiatjaf@gmail.com> | 2023-01-06 12:18:20 -0300 |
| commit | 01a3090c6ab872621e01019c58f8cac38c354c25 (patch) | |
| tree | 27e52fccd1315365db05a736a5cf64febe78f18a | |
| parent | 8c3c42171503fd07e24bb8681fc01419974a2ac0 (diff) | |
NIP05 Improve CORS header check command
| -rw-r--r-- | 05.md | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -83,7 +83,7 @@ By adding the `<local-part>` as a query string instead of as part of the path th | |||
| 83 | JavaScript Nostr apps may be restricted by browser [CORS][] policies that prevent them from accessing `/.well-known/nostr.json` on the user's domain. When CORS prevents JS from loading a resource, the JS program sees it as a network failure identical to the resource not existing, so it is not possible for a pure-JS app to tell the user for certain that the failure was caused by a CORS issue. JS Nostr apps that see network failures requesting `/.well-known/nostr.json` files may want to recommend to users that they check the CORS policy of their servers, e.g.: | 83 | JavaScript Nostr apps may be restricted by browser [CORS][] policies that prevent them from accessing `/.well-known/nostr.json` on the user's domain. When CORS prevents JS from loading a resource, the JS program sees it as a network failure identical to the resource not existing, so it is not possible for a pure-JS app to tell the user for certain that the failure was caused by a CORS issue. JS Nostr apps that see network failures requesting `/.well-known/nostr.json` files may want to recommend to users that they check the CORS policy of their servers, e.g.: |
| 84 | 84 | ||
| 85 | ```bash | 85 | ```bash |
| 86 | $ curl -sI https://example.com/.well-known/nostr.json?name=bob | grep ^Access-Control | 86 | $ curl -sI https://example.com/.well-known/nostr.json?name=bob | grep -i ^Access-Control |
| 87 | Access-Control-Allow-Origin: * | 87 | Access-Control-Allow-Origin: * |
| 88 | ``` | 88 | ``` |
| 89 | 89 | ||