The WebSocket API in browsers doesn't support custom headers, but it does support a protocols array, which corresponds to the Sec-WebSocket-Protocol header. If the client is called with a single Sec-WebSocket-Protocol header in the headers map, it should not eagerly fail.
The WebSocket API in browsers doesn't support custom headers, but it does support a protocols array, which corresponds to the
Sec-WebSocket-Protocol
header. If the client is called with a singleSec-WebSocket-Protocol
header in theheaders
map, it should not eagerly fail.