Closed ghost closed 9 years ago
You can freely override anything including XHR headers by listening to xhrSetup event: http://filedropjs.org/#fe
zone.on('xhrSetup', function (xhr) {
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest')
})
Its possible to add to the header, but its impossible to overwrite it there.
X-Requested-With:FileDrop-XHR-FileAPI, XMLHttpRequest
Hm, right. Well, in this case just disable these headers with extraHeaders option and set X-...
yourself. http://filedropjs.org/#fo
Yes, but then i have the file-headers myself to, something which I would like to avoid.
I gave it a second thought and guess there's nothing wrong with opt.xRequestedWith. http://filedropjs.org/#fo
It should be possible to set X-Requested-With (or just an option for not setting it)
I have server-side code (which I cant change in the near future) which checks if X-Requested-With equals XMLHttpRequest for determining if the request is an ajax request.