]> source.dussan.org Git - jquery.git/commitdiff
Make it possible to force the Ajax crossDomain option to false.
authorJessThrysoee <jess@thrysoee.dk>
Thu, 10 Mar 2011 23:17:38 +0000 (00:17 +0100)
committerJessThrysoee <jess@thrysoee.dk>
Thu, 10 Mar 2011 23:17:38 +0000 (00:17 +0100)
src/ajax.js

index 4714afdae1c43138e31174585288ed27ad5130a6..66b26cd70d716e43b2fb7a6f25022cea9c84fa71 100644 (file)
@@ -310,6 +310,7 @@ jQuery.extend({
                contentType: "application/x-www-form-urlencoded",
                processData: true,
                async: true,
+               crossDomain: null,
                /*
                timeout: 0,
                data: null,
@@ -319,7 +320,6 @@ jQuery.extend({
                cache: null,
                traditional: false,
                headers: {},
-               crossDomain: null,
                */
 
                accepts: {
@@ -604,7 +604,7 @@ jQuery.extend({
                s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
 
                // Determine if a cross-domain request is in order
-               if ( !s.crossDomain ) {
+               if ( s.crossDomain == null ) {
                        parts = rurl.exec( s.url.toLowerCase() );
                        s.crossDomain = !!( parts &&
                                ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||