Replying to Avatar hzrd149

nostr:npub1yvgrrzf4dnmu30qfhw95x87ruu0g2kpv3a64h8hpvqsre8qeuspsgd6pv9 and for anyone else curious this is an overview of how nsite servers work with nostr relays and blossom servers

https://cdn.hzrd149.com/b91ebca6972050bbd2ef829f30b5f875cba75ed06e37e38a990368a50f58da24.webp

NIP PR for those who want to read the spec https://github.com/nostr-protocol/nips/pull/1538

oops i forgot the /feed.xml on the browser request, updated version

https://cdn.hzrd149.com/96e794040c41a5163818bb5d80c6504d85eb744df93449bd86725592a53d811a.webp

Reply to this note

Please Login to reply.

Discussion

Ok, so it seems like there should be a way for me to host something like a database or API, and instead of having auth keys, I have authorized npubs. Maybe you have to create and sign an event proving you are the npub, and if so, and you’re in the approved list, you’re able to fetch the data.

No, not really. nsite only works for static files, I've been using it as a replacement for aws s3 deployments

So, nsiteBeats is trying to fetch data from the Podcast Index but is failing because it doesn’t have auth keys. We could get auth keys and hard code then in the static file, but then they’re visible for all to see. Not necessarily a bad thing, but if abused, the keys get revoked. There’s browser plugins that are doing it this way. I’m trying to think of a way nsiteBeats could make a call to an API and the API can say, yeah, I approve traffic from any site with that npub, here’s your data.

We could let the user bring their own API key. Besides that I think the only open would be to hard code the key