Interesting. The code up somewhere?
Discussion
Hopefully this week. My first approach was a bit destructive, haha. I’m refactoring it now.
Works for event view and overlay. Not for DMs as yet. Needs edge case handling improvements.
This code works as an example 402 payment required server. I’ve refactored it a lot locally too - but should work fine.
I have something early you can look at. Lots of todos, a small bugs/issues.
https://github.com/blakejakopovic/damus/commit/e27162b00fb10dcf2f02cc2fe533e1a09cb168aa
Basic testing endpoint (doesn't validate actual BLA content, just that something exists)
curl -I -H "Authorization: Nostr BLA" 
Endpoint code: https://gist.github.com/blakejakopovic/2e8fa806e1b85c17411b66b55f3df4e8
nostr:note172de9jv7nthqj06eznqke0u7v3zngluz9j06rskrauf5kry4428s8d7haw

