WebSocketUpgradeResult
type WebSocketUpgradeResult = void | FlareResponse | WebSocketRefusalWhat one upgrade hook run decides.
- nothing: proceed with the handshake.
- FlareResponse: deny the handshake; readable by HTTP-speaking clients (curl, server clients).
- WebSocketRefusal: accept then immediately close; the refusal a BROWSER can read (a failed
handshake exposes nothing to its JavaScript, while a close frame’s code and reason arrive in the
closeevent).
Learn: Overview