1

I developed a Chrome Extension which manipulates response headers of network requests.

chrome.webRequest.onHeadersReceived.addListener(
  manipulateResponseHeaders,
  { urls: ['<all_urls>'] },
  ['blocking', 'responseHeaders']
);

function manipulateResponseHeaders(details) {
  var modifiedHeaders = someModification(details.responseHeaders);
  return {responseHeaders: modifiedHeaders};
}

Consider website URL: http://www.myntra.com This website redirects to https://www.myntra.com with status 301 Moved Permanently.

My extension successfully intercepts http://www.myntra.com but not https://www.myntra.com.

Permissions in manifest.json:

"permissions": [
  "contextMenus",
  "declarativeContent",
  "storage",
  "webRequest",
  "webRequestBlocking",
  "webNavigation",
  "tabs",
  "http://*/*",
  "https://*/*"
]

Is it a restriction from Chrome WebRequest APIs or I'm missing some permissions?

Vaibhav Nigam
  • 1,334
  • 12
  • 21
  • Sounds like a bug. Check https://crbug.com - maybe it's already reported or even fixed in Canary. – wOxxOm Jan 16 '19 at 04:29
  • @wOxxOm Unfortunately, I don't find any existing bug. – Vaibhav Nigam Jan 16 '19 at 06:32
  • thanks @wOxxOm for suggesting that. I've submitted it here: https://bugs.chromium.org/p/chromium/issues/detail?id=922361. Also posted on Google groups: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-extensions/qCvqF1-omFE – Vaibhav Nigam Jan 16 '19 at 09:25

0 Answers0