Buchannon
Buchannon

Reputation: 1691

Node.js connecting to signalR 2

I've been trying to implement this node library: signalr-client and keep running into an issue on the node side. "Sec-WebSocket-Accept header from server didn't match expected value of {hashed value}".

When I debug the .NET hub side, I can tap into:

override Task OnConnected()

During debugging I can see the value of the request header "Sec-WebSocket-Key" coming through properly:

However the response on the node side always errors out with this:

Upvotes: 1

Views: 783

Answers (1)

Serkan Polat
Serkan Polat

Reputation: 99

open: node-modules/websocket/lib/websocketclient.js

if (headers['sec-websocket-accept'] !== expectedKey) {
//this.failHandshake('Sec-WebSocket-Accept header from server didn\'t match expected value of ' + expectedKey);
//return;
}

remark 2 lines as above.. thats all

Upvotes: 1

Related Questions