17

Does anyone know if Firefox extensions are allowed to modify HTTP response headers? For example, can an extension remove the x-frame-options header to let the page load in an iframe?

Thanks

Kar
  • 6,063
  • 7
  • 53
  • 82

6 Answers6

5

I think the best firefox addon for modifying headers is TamperData :

https://addons.mozilla.org/en-US/firefox/addon/966/

Etienne
  • 53
  • 1
  • 5
  • 5
    Correct me if I'm wrong, TamperData, like ModifyHeaders can't modify HTTP response headers, only request headers. – baptx Feb 05 '13 at 20:09
3

S. Wong is correct. Modify Headers supports modification of request headers only at present. However, I am looking at supporting response headers for a future version.

Gareth
  • 46
  • 2
  • There is a Firefox addon that was created for modifying CORS HTTP response headers but you can customize this headers in about:config/forcecors.headers, see https://addons.mozilla.org/en-US/firefox/addon/forcecors/ – baptx Feb 05 '13 at 20:13
2

it's late but i found some thing, i was going through code of "temper data" extention and i was able to modify the response as:

  observe: function(aSubject, aTopic, aData) {

    if (aTopic == 'http-on-modify-request') {
        aSubject.QueryInterface(Components.interfaces.nsIHttpChannel);
        this.onModifyRequest(aSubject);
       }
}   


   onModifyRequest(oHttp){
     //this is how i modify the set-cookie field from header
      oHttp.setResponseHeader("Set-Cookie", enc, false);
   }
amit
  • 337
  • 1
  • 11
1

Install PourBico for Firefox.

Open PourBico window. Reload URL, modify the header, reload page.

Christophe Roussy
  • 16,299
  • 4
  • 85
  • 85
1

There is a Modify Response addon that is limited to Content-Type, but should be adaptable to all (most) others.

0

Yes they can modify HTTP response headers if you look at below links you will have a better idea.

http://wareseeker.com/free-modify-headers/

http://www.softpedia.com/get/Internet/Internet-Applications-Addons/Mozilla-Extensions/Modify-Headers.shtml

http://modifyheaders.mozdev.org/

Ravi Vanapalli
  • 9,805
  • 3
  • 33
  • 43