Skip to content

Commit

Permalink
ServeHTTP now only does one of the options and doesn't fall to the de…
Browse files Browse the repository at this point in the history
…fault
  • Loading branch information
mleku committed Nov 29, 2024
1 parent 6d7f8e7 commit 6492652
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion realy/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion realy/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.2.19
v1.2.20

0 comments on commit 6492652

Please sign in to comment.