Skip to content

Commit 9a6fd66

Browse files
committed
Use $.support.cors instead of $.ajaxSettings.xhr().withCredentials.
1 parent 2c96684 commit 9a6fd66

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

js/cors/jquery.xdr-transport.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery XDomainRequest Transport Plugin 1.1.1
2+
* jQuery XDomainRequest Transport Plugin 1.1.2
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2011, Sebastian Tschan
@@ -26,7 +26,7 @@
2626
}
2727
}(function ($) {
2828
'use strict';
29-
if (window.XDomainRequest && $.ajaxSettings.xhr().withCredentials === undefined) {
29+
if (window.XDomainRequest && !$.support.cors) {
3030
$.ajaxTransport(function (s) {
3131
if (s.crossDomain && s.async) {
3232
if (s.timeout) {

js/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload Plugin JS Example 6.5
2+
* jQuery File Upload Plugin JS Example 6.5.1
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2010, Sebastian Tschan
@@ -38,7 +38,7 @@ $(function () {
3838
resizeMaxHeight: 1200
3939
});
4040
// Upload server status check for browsers with CORS support:
41-
if ($.ajaxSettings.xhr().withCredentials !== undefined) {
41+
if ($.support.cors) {
4242
$.ajax({
4343
url: '//jquery-file-upload.appspot.com/',
4444
type: 'HEAD'

0 commit comments

Comments
 (0)