khatru: upgrade docs a little more.

This commit is contained in:
fiatjaf
2025-05-02 23:52:49 -03:00
parent 1ece6d0eab
commit f0b3da78ef
12 changed files with 78 additions and 87 deletions

View File

@@ -66,8 +66,8 @@ func main() {
// define your own policies
func(ctx context.Context, filter nostr.Filter) (reject bool, msg string) {
if pubkey, isAuthed := khatru.GetAuthed(ctx); !isAuthed {
log.Printf("request from %s\n", pubkey)
if authed, is := khatru.GetAuthed(ctx); !is {
log.Printf("request from %s\n", authed)
return false, ""
}
return true, "auth-required: only authenticated users can read from this relay"