Skip to content

Commit 515c56f

Browse files
committed
Make it possible to force the Ajax crossDomain option to false.
1 parent 6c124d3 commit 515c56f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ajax.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ jQuery.extend({
310310
contentType: "application/x-www-form-urlencoded",
311311
processData: true,
312312
async: true,
313+
crossDomain: null,
313314
/*
314315
timeout: 0,
315316
data: null,
@@ -319,7 +320,6 @@ jQuery.extend({
319320
cache: null,
320321
traditional: false,
321322
headers: {},
322-
crossDomain: null,
323323
*/
324324

325325
accepts: {
@@ -604,7 +604,7 @@ jQuery.extend({
604604
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
605605

606606
// Determine if a cross-domain request is in order
607-
if ( !s.crossDomain ) {
607+
if ( s.crossDomain == null ) {
608608
parts = rurl.exec( s.url.toLowerCase() );
609609
s.crossDomain = !!( parts &&
610610
( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||

0 commit comments

Comments
 (0)