mirror of
https://github.com/tenrok/axios.git
synced 2026-06-05 16:42:32 +03:00
Reverting default X-Requested-With header for xhr
for more details see https://remysharp.com/2011/04/21/getting-cors-working
This commit is contained in:
@@ -25,9 +25,6 @@ module.exports = function xhrAdapter(resolve, reject, config) {
|
||||
config.headers || {}
|
||||
);
|
||||
|
||||
// Indicate that request is being made with XHR
|
||||
requestHeaders['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
if (utils.isFormData(data)) {
|
||||
delete requestHeaders['Content-Type']; // Let the browser set it
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user