Skip to content

Commit

Permalink
fix(server,nip11): fix nip11 condition on websocket server. (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
kehiy authored Oct 13, 2024
1 parent 7a7e25c commit fd85392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/websocket/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (s *Server) Start() error {

// handleWS is WebSocket handler.
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if r.Header.Get("Connection") != "Upgrade" || r.Header.Get("Upgrade") != "websocket" {
if r.Header.Get("Accept") == "application/nostr+json" {
w.Header().Set("Content-Type", "application/nostr+json")
w.WriteHeader(http.StatusOK)

Expand Down

0 comments on commit fd85392

Please # to comment.