title: Firefox extension request is interpreted as CORS
body: <p>When porting my Chrome extension to a Firefox web-extension, I can't make any network requests because they are blocked by the same origin policy.</p>
  
  <p>As an example:</p>
  
  <pre><code>const headers = {"content-type": "application/json" };
  window.fetch(myDomain + "/api/v3/token", { method: "GET", headers: headers });
  </code></pre>
  
  <p>This fails with the following error:</p>
  
  <p><a href="https://i.stack.imgur.com/zWr3R.png" rel="noreferrer"><img src="https://i.stack.imgur.com/zWr3R.png" alt="enter image description here"></a></p>
  
  <p>Is there a way to configure the Firefox extension to not consider these requests CORS? The same code works just fine as a Google Chrome extension.</p>
  
  <p>This holds true even if the request goes to localhost.</p>
  
  <p>I have tried this with jquery's <code>$.ajax</code> method and axios library to get the same result (works in Chrome, doesn't work in Firefox) so I don't think the problem is limited to the <code>window.fetch</code> API.</p>
  
  <p>EDIT: I know that I can add a CORS handler on the server side, but I'm trying not to do that. And why does this work in Chrome and not in Firefox?</p>
  
  <p>EDIT 2: The extension is a popup</p>