crossws
crossws copied to clipboard
[ws] Protocol handling
Describe the feature
I couldn't find a way to get sec-websocket-protocol
, and based on this value abort the connection or not. The upgrade
hook looks promising, but it seems only possible to return headers there and not completely abort the upgrade. It would also be nice if one could later get the protocol from Peer
.
(Background: graphql-ws supports only the graphql-ws subprotocol and normally rejects the (deprecated) subscriptions-transport-ws subprotocol. Such a check is currently hard to implement.)
Additional information
- [ ] Would you be willing to help implement this feature?