Can I modify outgoing request headers with a Chrome Extension? -


I can not find the answer, though I'm probably not looking at the right place.

I want to stop HTTP requests with a Chrome extension, and then with potentially new / different HTTP headers - how can I do this?

This was certainly not possible when OP asked the question but soon Chrome released experimental Done But now they are officially included in the Chrome extension. You can modify it in Chrome and request header feedback.

Check out this example:

  chrome.webRequest.onBeforeSendHeaders.addListener (function) {for (var I = 0; i & lt; details.requestHeaders. Length; ++ i) {If request headings [i] .name === 'user-agent') {details.requestHeaders.splice (i, 1); break;}} return {request header: description. Request} header}}}, {urls: ['& lt; all_urls';']}, ['blocked', 'request header']);  

If you want to use Chrome Extensions, you can use that allows you to modify the request and response header as you want. Take a look at this snapshot:

header rule

PS: I am the author of this extension so that you can not like anything for which you do not like :)


Comments