crossws icon indicating copy to clipboard operation
crossws copied to clipboard

[ws] Protocol handling

Open tobiasdiez opened this issue 11 months ago • 2 comments

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?

tobiasdiez avatar Mar 23 '24 09:03 tobiasdiez