Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: xhr.withCredentials is initially
false
According to the [XMLHttpRequest2 spec](http://www.w3.org/TR/XMLHttpRequest2/#the-withcredentials-attribute), `xhr.withCredentials` should be initially `false`. http-browserify sets this flag to `true` by default which disobeys the spec. This leads to browser errors when making CORS requests to domains that have wildcards in their Access-Control-Allow-Origin header. http-browserify should attempt to follow the spec by default. In this case, that means setting `withCredentails` to `false` initially, and then allowing the user to override that in the passing in `params`. Maybe it is possible to auto-detect when [user credentials](http://www.w3.org/TR/XMLHttpRequest2/#user-credentials) are being sent and then set the `withCredentials` flag from there. Somewhat related to browserify#35 (the committer there expressed concern about `withCredentials` being `true` when unintialzed as well).
- Loading branch information