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" + } +}