From 8e5bf550969a03c74783c2ab61b8bf6a0a87339c Mon Sep 17 00:00:00 2001 From: sepehr-safari Date: Mon, 13 Jul 2026 20:52:38 +0300 Subject: [PATCH] feat: NIP-05 identifiers (_@ and sepehr@) via well-known/nostr.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Serves /.well-known/nostr.json mapping the '_' (root) and 'sepehr' names to the pubkey (hex 3e294d2f…ca8e), with the NIP-05-required Access-Control-Allow-Origin: * header so web clients can verify the identifiers. No domain string committed. --- next.config.mjs | 10 ++++++++++ public/.well-known/nostr.json | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 public/.well-known/nostr.json diff --git a/next.config.mjs b/next.config.mjs index 95c257e..d80eae5 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -8,4 +8,14 @@ export default withNextra({ reactStrictMode: true, // No metadataBase / hard-coded site URL here on purpose: the public domain is // configured in the deploy dashboard (Vercel), never committed to this repo. + async headers() { + return [ + { + // NIP-05 requires the identifier file to be readable cross-origin so + // web clients can verify name@domain -> pubkey mappings. + source: '/.well-known/nostr.json', + headers: [{ key: 'Access-Control-Allow-Origin', value: '*' }], + }, + ] + }, }) diff --git a/public/.well-known/nostr.json b/public/.well-known/nostr.json new file mode 100644 index 0000000..656b30c --- /dev/null +++ b/public/.well-known/nostr.json @@ -0,0 +1,6 @@ +{ + "names": { + "_": "3e294d2fd339bb16a5403a86e3664947dd408c4d87a0066524f8a573ae53ca8e", + "sepehr": "3e294d2fd339bb16a5403a86e3664947dd408c4d87a0066524f8a573ae53ca8e" + } +}