Closed Infocatcher closed 8 years ago
Test for Firefox 3.6 and older (also works in newer versions):
var Services = "Services" in window && window.Services || {
obs: Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService)
};
var observer = {
observe: function(subject, topic, data) {
if(subject instanceof Components.interfaces.nsIHttpChannel) {
subject.setRequestHeader("Referer", "https://google.com/", false);
subject.setRequestHeader("User-Agent", "", false);
subject.setRequestHeader("X-Test", "test", false);
}
}
};
Services.obs.addObserver(observer, "http-on-modify-request", false);
setTimeout(function() {
Services.obs.removeObserver(observer, "http-on-modify-request");
}, 5e3);
Oh, we also detects Cookie
header.
-Show request headers modifications from other extensions
+Show request headers modifications from browser or other extensions
Also added secret extensions.linkPropertiesPlus.showRequestHeadersDiff preference to display changes in diff style.
Example: