aboutsummaryrefslogtreecommitdiffstats
path: root/names/server.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-01 22:42:15 -0700
committerAdam Soltys <[email protected]>2026-08-01 22:42:15 -0700
commite4e32b8d8093072a49773b0d92bd1a733187e828 (patch)
tree7ee1e1e1c25e9f7fdc16615627c7fa983781a262 /names/server.js
parent14be8fc36807916b9f0be41e89ffc9f5da9b9e7b (diff)
downloadcoinosv3-server-e4e32b8d8093072a49773b0d92bd1a733187e828.tar.gz
coinosv3-server-e4e32b8d8093072a49773b0d92bd1a733187e828.zip
The real cause: the CORS preflight rejected our own auth header
NIP-98 puts the claim under an Authorization header, but the registrar only allowed content-type in access-control-allow-headers, so browsers blocked every claim before sending it. The failure arrived as a generic network error, which the retry logic treated as transient — hence the endless 'setting up your payment address' spinner. Bun tests never saw it because they don't preflight. Registrar now allows the header. Client-side, nothing may hang: signing, the registrar call and the ark lookup all have timeouts, retries are capped, and a one-minute watchdog always resolves the spinner into either an address or the manual form. Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'names/server.js')
-rw-r--r--names/server.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/names/server.js b/names/server.js
index bd693b2..8f1971a 100644
--- a/names/server.js
+++ b/names/server.js
@@ -247,7 +247,7 @@ const json = (body, status = 200) => new Response(JSON.stringify(body), {
headers: {
'content-type': 'application/json',
'access-control-allow-origin': '*',
- 'access-control-allow-headers': 'content-type',
+ 'access-control-allow-headers': 'content-type,authorization',
'access-control-allow-methods': 'GET,POST,DELETE,OPTIONS',
},
});