-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow extraHeaders to be set for browser clients in XHR requests. #410
Comments
Because not all transports support custom headers. |
I appreciate that. But at the moment it is impossible to set them for those that do. I have a use case to set custom auth headers and this is not possible without removing the node-js client check inside the library, which I would rather not do. At the moment Node js client transports can use this feature and no other can as a special case (as is documented in the code). So I am struggling to see why this is not "transports that support extra headers". I cannot see why this is such an issue - its not like the transports are entirely symmetrical in their behaviour. |
Hasn't this been addressed by https://github.com/socketio/engine.io-client/blob/master/History.md#160--2015-11-28 ? |
I have no idea - which commit was it in? its not referenced on this issue if it is. |
I also think
That way the polling doesn't keep getting redirected by the authentication module when I am logged out (building up state cookies). If the request has the above header, then the authentication module will just return 401's as it will know it is an Ajax request. I believe jQuery has this on by default: http://api.jquery.com/jquery.ajax/ |
The current extraHeaders functionality seems to restrict setting extra headers to clients running in Node.
Why not allow this to be used in the browser ?- especially to be able to set custom headers for the xhr request.
Most browsers check the headers allowed so I do not see this as a security issue. It should also be possible to set the withCredentials header using this mechanism to enable cookies to be passed.
The text was updated successfully, but these errors were encountered: