From 809865ca0ccfd28b82b8c3f038b5891d4c58e81f Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Tue, 16 Jul 2024 13:26:54 -0300 Subject: [PATCH] relay management: adhere to NIP-98 stupidity. --- relay.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/relay.go b/relay.go index 555990b..703898b 100644 --- a/relay.go +++ b/relay.go @@ -10,7 +10,6 @@ import ( "fmt" "io" "net/http" - "strings" "github.com/nbd-wtf/go-nostr" "github.com/nbd-wtf/go-nostr/nip11" @@ -131,13 +130,13 @@ var relay = &cli.Command{ } // Authorization - hostname := strings.Split(strings.Split(httpUrl, "://")[1], "/")[0] payloadHash := sha256.Sum256(reqj) authEvent := nostr.Event{ Kind: 27235, CreatedAt: nostr.Now(), Tags: nostr.Tags{ - {"host", hostname}, + {"u", httpUrl}, + {"method", "POST"}, {"payload", hex.EncodeToString(payloadHash[:])}, }, }