开发者

Modifying HTTP response headers in Firefox

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

Thanks


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

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


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.


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);
   }


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


Install PourBico for Firefox.

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


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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜