Patch Snap.ajax to allow CORS GET requests

master
Tom Conroy 2014-04-29 15:33:00 -04:00
parent 0f466e855d
commit c9c743ab99
1 changed files with 1 additions and 1 deletions

View File

@ -3260,8 +3260,8 @@ Snap.ajax = function (url, postData, callback, scope){
postData = pd.join("&"); postData = pd.join("&");
} }
req.open((postData ? "POST" : "GET"), url, true); req.open((postData ? "POST" : "GET"), url, true);
req.setRequestHeader("X-Requested-With", "XMLHttpRequest");
if (postData) { if (postData) {
req.setRequestHeader("X-Requested-With", "XMLHttpRequest");
req.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
} }
if (callback) { if (callback) {