adding cors parameters to extjs ajax

JavaScript
Ext.Ajax.request({
	... // Removed code for brevity
    cors: true,
    useDefaultXhrHeader : false,
    ... // Removed code for brevity
});
Source

Also in JavaScript: