From c9c743ab99f3a2a1162c33b1e59d4b3d93a197c3 Mon Sep 17 00:00:00 2001 From: Tom Conroy Date: Tue, 29 Apr 2014 15:33:00 -0400 Subject: [PATCH] Patch Snap.ajax to allow CORS GET requests --- src/svg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/svg.js b/src/svg.js index bd64b25..af6177f 100644 --- a/src/svg.js +++ b/src/svg.js @@ -3260,8 +3260,8 @@ Snap.ajax = function (url, postData, callback, scope){ postData = pd.join("&"); } req.open((postData ? "POST" : "GET"), url, true); - req.setRequestHeader("X-Requested-With", "XMLHttpRequest"); if (postData) { + req.setRequestHeader("X-Requested-With", "XMLHttpRequest"); req.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); } if (callback) {