mirror of
https://github.com/fiatjaf/khatru.git
synced 2025-03-17 21:32:55 +01:00
include original http.Request in WebSocket struct.
This commit is contained in:
parent
84d01dc1d3
commit
3c1b062eb8
@ -45,6 +45,7 @@ func (rl *Relay) HandleWebsocket(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
ws := &WebSocket{
|
||||
conn: conn,
|
||||
Request: r,
|
||||
Challenge: hex.EncodeToString(challenge),
|
||||
Authed: make(chan struct{}),
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package khatru
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"sync"
|
||||
|
||||
"github.com/fasthttp/websocket"
|
||||
@ -10,6 +11,9 @@ type WebSocket struct {
|
||||
conn *websocket.Conn
|
||||
mutex sync.Mutex
|
||||
|
||||
// original request
|
||||
Request *http.Request
|
||||
|
||||
// nip42
|
||||
Challenge string
|
||||
AuthedPublicKey string
|
||||
|
Loading…
x
Reference in New Issue
Block a user