Skip to content

Commit

Permalink
Revert X-Requested-With header.
Browse files Browse the repository at this point in the history
Unfortunately, this breaks cross-origin requests. When the d3.xhr module is
redesigned, we'll add support for setting custom headers with requests.
  • Loading branch information
mbostock committed Apr 15, 2012
1 parent cdffe18 commit d165879
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion d3.v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ d3.xhr = function(url, mime, callback) {
if (arguments.length < 3) callback = mime, mime = null;
else if (mime && req.overrideMimeType) req.overrideMimeType(mime);
req.open("GET", url, true);
req.setRequestHeader("X-Requested-With", "XMLHttpRequest");
if (mime) req.setRequestHeader("Accept", mime);
req.onreadystatechange = function() {
if (req.readyState === 4) {
Expand Down
Loading

0 comments on commit d165879

Please sign in to comment.