envjs / env-js

A pure-JavaScript browser environment.
http://www.envjs.com/
87 stars 19 forks source link

jQuery 1.6.4: Cross-domain requests fail due to lack of CORS support #29

Closed vanm closed 12 years ago

vanm commented 12 years ago

In jQuery 1.6.4, the Ajax Transport checks if the request is "crossDomain" and, if so, requires jQuery.support.cors to be true:

if ( !s.crossDomain || jQuery.support.cors ) {

CORS support checks for the existence of the 'withCredentials' property (default boolean false), which is not present in Envjs.

I added it in this commit: https://github.com/vanm/env-js/commit/2f485c0ea5706354a1bbc53ddc6d5d894746a79f

Since most requests in our test suite are classified as "crossDomain" by jQuery, this is required to get $.ajax requests working properly.