Skip to content

Commit

Permalink
Merge pull request #1825 from sizzlemctwizzle/issue-1824
Browse files Browse the repository at this point in the history
Set headers on HTTP requests that GM originates.

Fixes #1824
  • Loading branch information
arantius committed Jan 29, 2014
2 parents 56ca67d + 5d1f10f commit 838f5b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/script.js
Expand Up @@ -731,6 +731,9 @@ Script.prototype.checkForRemoteUpdate = function(aCallback, aForced) {
.createInstance(Components.interfaces.nsIXMLHttpRequest);
req.overrideMimeType('application/javascript');
req.open("GET", url, true);

// Let the server know we want a user script metadata block
req.setRequestHeader('Accept', 'text/x-userscript-meta');
req.onload = GM_util.hitch(
this, "checkRemoteVersion", req, aCallback, aForced);
req.onerror = GM_util.hitch(null, aCallback, false);
Expand Down

0 comments on commit 838f5b7

Please sign in to comment.