Edge extensions don't work with XMLHttpRequest to localhost

Confirmed Issue #13966307 • Assigned to Akshay P.

Details

Author
Ken M.
Created
Sep 27, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Edge extensions (unlike Chrome, Safari and Firefox) don’t properly handle XMLHttpRequest calls to localhost in a background script.

To reproduce:

  1. Run a web server on localhost (127.0.0.1 on port 8000) (an easy way to do this with python 3 is: python -m http.server 8000
  2. Load the attached extension in Edge
  3. Open the background script for debugging
  4. Go to https://developer.microsoft.com/en-us/windows/bridges/hosted-web-apps and hit refresh if necessary (this just kicks off the content script and gets things going)
  5. In the background debugger, you would expect to see these console messages:
    UNSENT 0
    OPENED 0
    LOADING 200
    DONE 200
  6. Note that instead only UNSENT and OPENED messages are seen and status doesn’t change from 0
  7. To see the script working with a non-localhost address, comment out this line in the background-script.js file:
    var url = 'http://127.0.0.1:8000';
    and uncomment the line before:
    //var url = 'https://developer.mozilla.org:443';
  8. Reload the extension and refresh the page and everything works as expected (for the non-localhost page)

Attachments

1 attachment

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

    Changed Assigned To to “Akshay P.”

    Changed Status to “Confirmed”

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

Sign in