4

I'm using the webRequest API in an Opera extension to listen for outgoing requests like:

chrome.webRequest.onBeforeRequest.addListener(req => console.log(req), {urls: ['*://*.example.net/*']}, ['blocking']);

This behaves as expected for most URLs. Starting with Opera 48 though, it is not firing for certain requests on certain domains.

When I for example try to listen for a Google search like:

chrome.webRequest.onBeforeRequest.addListener(req => console.log(req), {urls: ['*://*.google.com/*']}, ['blocking']);

and then perform a query using Opera's omnibox I will see all requests against google.com domains but the one that is the initial GET request (i.e. I'd expect sth like GET https://www.google.com/search?q=opera to show up).

This seems to happen for some domains only. I found out it happens for Google, Bing, DuckDuckGo and Wikipedia (which are default search engines in Opera), it does not happen for Yahoo (which is a default search engine as well). I couldn't reproduce the missing inital request on any other domain yet.

The changelog for Opera 48 doesn't show anything about any changes here.

Is this a bug, am I missing something or is it a willfully introduced limitation to prevent request hijacking?

m90
  • 11,434
  • 13
  • 62
  • 112

0 Answers0