Why Nostr? What is Njump?
2024-06-19 11:25:00

1024党总干事 on Nostr: ...

闲着无聊改了下bostr代码,增加了nip-05的功能,我自己的nip-05地址已经改成了 `[email protected]` 😇,代码改动如下:
```
~/bostr# git diff
diff --git a/http.js b/http.js
index dba6c47..15c4567 100644
--- a/http.js
+++ b/http.js
@@ -138,6 +138,11 @@ server.on('request', (req, res) => {
} else if (req.url.includes("favicon") && favicon) {
res.writeHead(200, { "Content-Type": "image/" + config.favicon?.split(".").pop() });
res.end(favicon);
+ } else if (req.url.includes(".well-known/nostr.json")) {
+ return res.writeHead(200, {
+ "Content-Type": "application/json",
+ "Access-Control-Allow-Origin": "*"
+ }).end(JSON.stringify({"names":{"1024":"6d088b653a1bffe728b9b17e5c7afcfc18d85f70502feac83400524eb6a8d5e9"}}));
} else {
res.writeHead(404).end("What are you looking for?");
}

```

跟bostr作者私聊了下这个想法,他建议是把nip-05的metadata放在反向代理那边,比如配置nginx/caddy的静态url规则,不过我不太会配置caddy这个反向代理,先改bostr代码玩玩好了。😇
Author Public Key
npub1d5ygkef6r0l7w29ek9l9c7hulsvdshms2qh74jp5qpfyad4g6h5s4ap6lz