Set Access-Control-Allow-Origin: * on /.well-known/nostr.json

NIP-05 requires this header so browser-based Nostr clients can validate
identities via fetch from any origin.
This commit is contained in:
2026-05-06 19:07:01 +00:00
parent bbfc64733a
commit 5b234b6b61

View File

@@ -12,6 +12,7 @@ type NostrJSON struct {
}
func (h *NostrJSON) Handle(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Cache-Control", "public, max-age=60")
names, err := h.Users.Repo().ActiveByName(r.Context())