fix: nostr auth
This commit is contained in:
parent
2fdd3da9d0
commit
7b37ad6479
1 changed files with 6 additions and 0 deletions
|
@ -145,11 +145,17 @@ func NewRelay(version string) *khatru.Relay {
|
|||
|
||||
relay.RejectFilter = append(
|
||||
relay.RejectFilter,
|
||||
testfilter,
|
||||
policies.RejectKind04Snoopers,
|
||||
)
|
||||
return relay
|
||||
}
|
||||
|
||||
func testfilter(ctx context.Context, filter nostr.Filter) (bool, string) {
|
||||
l.Debug().Msgf("test: %v", ctx)
|
||||
return true, "auth-required: this query requires you to be authenticated"
|
||||
}
|
||||
|
||||
func RejectUnregisteredNpubs(ctx context.Context, event *nostr.Event) (reject bool, msg string) {
|
||||
l := gologger.Get(config.GetConfig().LogLevel).With().Str("context", "nostr-reject-unregistered").Logger()
|
||||
authenticatedUser := khatru.GetAuthed(ctx)
|
||||
|
|
Loading…
Reference in a new issue