In manifest v3 extension, any http only url cannot be fetched.
manifest.json
{
"manifest_version": 3,
"version": "0.0.0",
"name": "test",
"background":{
"scripts": ["background.js"]
},
"host_permissions": ["<all_urls>"]
}
background.js
const init = () => {
fetch("http://http.rip")
.then((res) => res.text())
.then((text) => {
console.log(text);
})
.catch((err) => {
console.error(err);
});
};
browser.runtime.onStartup.addListener(init);
browser.runtime.onInstalled.addListener(init);
How do I fetch http only url in Firefox manifest v3?
You can fetch http only url in Chrome.