-
Notifications
You must be signed in to change notification settings - Fork 355
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
Fix for #535 ExtraHeaders doesn't work in browser #536
Conversation
Great catch, thanks! I've just reverted the change to the output file engine.io.js, as it is automatically generated. |
Thanks, yeah I was unsure if that was necessary move, so created a separate commit, Regards, |
@lu4 out of curiosity, in your example here: let engine = engineio({
transportOptions: {
polling: {
extraHeaders: {
'X-TEST': 'ZZZ'
}
}
}
}); Won't the |
It wasn't my case, everything were working smoothly, no option request was generated... I didn't mean to use any predefined headers, just a first thing that came of my head... |
Includes the following (from engine.io-client changelog): * [chore] Bump ws to version 1.1.2 (vulnerability fix) ([socketio#539](socketio/engine.io-client#539)) * [fix] Fix extraHeaders option in browser ([socketio#536](socketio/engine.io-client#536))
Includes the following (from engine.io-client changelog): * [chore] Bump ws to version 1.1.2 (vulnerability fix) ([#539](socketio/engine.io-client#539)) * [fix] Fix extraHeaders option in browser ([#536](socketio/engine.io-client#536))
Includes the following (from engine.io-client changelog): * [chore] Bump ws to version 1.1.2 (vulnerability fix) ([#539](socketio/engine.io-client#539)) * [fix] Fix extraHeaders option in browser ([#536](socketio/engine.io-client#536))
Includes the following (from engine.io-client changelog): * [chore] Bump ws to version 1.1.2 (vulnerability fix) ([#539](socketio/engine.io-client#539)) * [fix] Fix extraHeaders option in browser ([#536](socketio/engine.io-client#536))
The kind of change this PR does introduce
Current behaviour
xhr.setDisableHeaderCheck is not introduced in some browsers so engine.io fails to set extraHeaders which makes feature #519 to fail.
New behaviour
xhr.setDisableHeaderCheck is checked to exist before call, in case if any secure headers are modified, browser throws error to prevent fraud.
Other information (e.g. related issues)
Please provide feedback in case if any PR rules are violated