Accessing resources from localhost through a web extension for testing
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?
All Replies (3)
Just in case you don't find a solution here, there's a forum for extension development support over on:
I don't know whether the following extension -- a kind of global workaround for CORS issues -- sees requests from extension pages:
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.
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