Closed tiagogm closed 5 years ago
Hi thanks for contributing. This is copied from react-native-signalr and it looks like it's hardcoded to false. It looks like originally in jQuery CORS support is automatically detected based on access-control-allow-origin header. This detection mechanism could be just copied in from original jQuery I guess http://stackoverflow.com/questions/15254777/what-is-the-impact-of-having-support-cors-true-on-non-cross-browser-ajax-ca
Hey @DVLP
Ah, I see, I couldn't found the jquery detection based on the header you mentioned, I did find this on the code though.
https://github.com/jquery/jquery/blob/master/src/ajax/xhr.js#L26
I could submit a PR with this included on the shim.
Would it be possible to get a new release with this changed merged in?
It would be highly useful for us in our development environment (and potentially production going forward).
Hello!
I'm been setting up signalr for a project of mine and ran into your project, which ideal for me since I don't want jquery.
I've noticed however in your shim you have setup cors to be false https://github.com/DVLP/signalr-no-jquery/blob/master/src/jQueryShim.js#L90
That means
$.support.cors
is always be false and cause the connection to usejsonp
https://github.com/DVLP/signalr-no-jquery/blob/master/src/signalR.js#L542I've looked at the code and there doesn't seem to be a way to change it or pass it as option. Is there a way you could expose this an option?
I could submit a PR if you wish.
Cheers!