Hello,
When uploading files, we have the need to set the withCredentials to false on the XmlHttpRequest. My upload event implementation is as follows:
The problem is that the code inside of kendo.all.js for postFormData() overrides the withCredentials value with a "true" after the xhr open event is fired. Thus overriding any setting to the string value of "true", prior to sending.
The code in kendo.all.js is as follows:
A fix for the issue would be to set the withCredentials value prior to opening the xhr as follows:
Please let me know if I am doing something wrong, or if there any plans to change this.
When uploading files, we have the need to set the withCredentials to false on the XmlHttpRequest. My upload event implementation is as follows:
upload:
function
(e) {
var
xhr = e.XMLHttpRequest;
if
(xhr) {
xhr.addEventListener(
'readystatechange'
,
function
(event) {
if
(xhr.readyState == 1) {
xhr.withCredentials =
false
;
xhr.setRequestHeader(
"Authorization"
,
"Bearer "
+ token);
xhr.crossDomain =
true
;
}
});
}
}
The problem is that the code inside of kendo.all.js for postFormData() overrides the withCredentials value with a "true" after the xhr open event is fired. Thus overriding any setting to the string value of "true", prior to sending.
The code in kendo.all.js is as follows:
xhr.open(
"POST"
, url,
true
);
xhr.withCredentials =
"true"
;
xhr.send(data);
A fix for the issue would be to set the withCredentials value prior to opening the xhr as follows:
xhr.withCredentials =
true
;
xhr.open(
"POST"
, url,
true
);
xhr.send(data);
Please let me know if I am doing something wrong, or if there any plans to change this.