Websocket fallback to xhr-polling b/c of missing authorization header when server behind basic_auth #575

Closed
LowPowerLab opened this Issue Sep 23, 2013 · 2 comments

2 participants

@LowPowerLab

I have an nginx server that proxies the websocket to a backend. All behind HTTPS.
Without basic auth enabled, socket.io establishes a websocket connection, very fast.
However if I enable basic auth in nginx, it seems the Authorization header is only sent in the initial socket.io request, then the websocket request fails because of the missing 401 header, causing socket.io to fallback to xhr polling, which is slower.
I would expect socket.io to include the auth header in all requests when one is present in the initial request.

image

@rauchg rauchg closed this Nov 25, 2014
@LowPowerLab

Hi guille, do you know if this was addressed in any prior release since I opened this ticket?

@rauchg

In 1.0 the connection should be fast, since it'll start with polling. WebSocket won't allow us to include the Authorization header, though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment