From 6492652b176b7ad1222f5fe1ff13e960b84a5a56 Mon Sep 17 00:00:00 2001 From: mleku Date: Fri, 29 Nov 2024 09:02:07 +0000 Subject: [PATCH] ServeHTTP now only does one of the options and doesn't fall to the default --- realy/server.go | 3 ++- realy/version | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/realy/server.go b/realy/server.go index 584d8af..5f132e3 100644 --- a/realy/server.go +++ b/realy/server.go @@ -103,10 +103,11 @@ func NewServer(sp ServerParams, opts ...Option) (*Server, E) { func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { if r.Header.Get("Upgrade") == "websocket" { s.HandleWebsocket(w, r) + return } else if r.Header.Get("Accept") == "application/nostr+json" { s.HandleNIP11(w, r) + return } - log.I.S(r) s.HandleAdmin(w, r) } diff --git a/realy/version b/realy/version index ed93651..b3257b5 100644 --- a/realy/version +++ b/realy/version @@ -1 +1 @@ -v1.2.19 \ No newline at end of file +v1.2.20 \ No newline at end of file