Set Sec-WebSocket-Protocol header to 'amqp' for WebSocket connections#183
Set Sec-WebSocket-Protocol header to 'amqp' for WebSocket connections#183
Conversation
Co-authored-by: antondalgren <9164583+antondalgren@users.noreply.github.com>
|
https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/WebSocket#protocols
|
The WebSocket client was not setting the
Sec-WebSocket-Protocolheader when establishing connections.Changes
"amqp"as the second parameter to theWebSocketconstructor inAMQPWebSocketClient.connect()This sets the standard WebSocket subprotocol header indicating AMQP protocol usage:
The browser/client will now send
Sec-WebSocket-Protocol: amqpin the HTTP upgrade request.Original prompt
Sec-WebSocket-Protocolwhen connecting over websocket #182✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.