Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Nummer anzurufen, sie per SMS zu kontaktieren oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Learn More

Accessing resources from localhost through a web extension for testing

  • 3 Antworten
  • 1 hat dieses Problem
  • 2 Aufrufe
  • Letzte Antwort von nnhien

more options

I've been trying to access some resources hosted locally with a web extension for testing, but I've been encountering CORS errors. I've added localhost to the permissions field of the extension's manifest.json, but I still encounter the CORS errors. I saw that bugs 1220810 and 1488740 addressed similar bugs in FF84, but Firefox still won't let me send the requests. If it helps at all, I've been trying to access the resources hosted on localhost from an https context, but I was under the impression that those bugs should have fixed that issue?

Ideally I wouldn't need to implement having the server respond with the CORS headers since it only seems to be a problem with Firefox in a local context. Accessing the local resources through Chrome works, and accessing the resources through the internet with the domain name in the permissions field of a production build of the extension's manifest.json works in Firefox. Is there a way to make Firefox disregard CORS enforcement for localhost for temporary extensions?

Alle Antworten (3)

more options

Just in case you don't find a solution here, there's a forum for extension development support over on:

https://discourse.mozilla.org/c/add-ons/development

Hilfreich?

more options

I don't know whether the following extension -- a kind of global workaround for CORS issues -- sees requests from extension pages:

https://addons.mozilla.org/firefox/addon/cors-everywhere/

Hilfreich?

more options

jscher2000 said

Just in case you don't find a solution here, there's a forum for extension development support over on: https://discourse.mozilla.org/c/add-ons/development

Ah my bad, I'll try there if I don't get a response here.

jscher2000 said

I don't know whether the following extension -- a kind of global workaround for CORS issues -- sees requests from extension pages: https://addons.mozilla.org/firefox/addon/cors-everywhere/

I've tried CORS Everywhere and unfortunately it doesn't seem like it can access requests from other extensions

Hilfreich?

Stellen Sie eine Frage

Sie müssen sich mit Ihrem Benutzerkonto anmelden, um auf Beiträge zu antworten. Bitte stellen Sie eine neue Frage, wenn Sie noch kein Benutzerkonto haben.