Extension redirect url in background.js does not work in Microsodt Edge

Confirmed Issue #18210150 • Assigned to Mahesh J.


Elisa K.
Jul 10, 2018
This issue is public.
Found in
  • Microsoft Edge
Reported by 4 people

Sign in to watch or report this issue.

Steps to reproduce

I have one extension that makes HTTP GET requests. In the extension background.js I want to do some redirects of those requests.
In Google Chrome it works as expected, but in Microsoft Edge it does not.

I created one example of the problem (based on https://github.com/mdn/webextensions-examples/tree/master/http-response)

This extension just show an html page and do a request for "www.google.com/gmail".
In the background.js it uses “browser.webRequest.onBeforeRequest.addListener” to listen and redirect the requests.
The expected behavior would be redirect the request from www.google.com/gmail to the local file “api/test.txt”

To test it,

  1. Install this extension (test-redirect-request)
  2. Click in the icon to open the extension
  3. Open the Inspect Page and refresh the page.
    In the Netork tab you will see that it did a request for "www.google.com/gmail". and it was not redirected to the local file.

If you keep this extension active and try to open www.google.com/gmail it redirects to the local file "api/test.txt".

I believe it is a bug in Microsoft Edge.
Does anyone have any idea of a workaround for it?


Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Mahesh J.”

    Changed Status to “Confirmed”

  • Can I ask what’s the status of this bug?

    It’s blocking the release of my content filtering plugin.

    Also this issue is a duplicate of https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/17950123/

  • Hello,

    any updates on this bug? It’s affecting our work as well

    Thank you

  • Hello,
    is there any solution?
    I have the same problem.


You need to sign in to your Microsoft account to add a comment.

Sign in