This is the first time I am trying to self host a mozilla addon (or web extension). I have already generated signed xpi file using web-ext
tool. Can someone please share the next steps to host the web extension so that users can directly install web extension from my site ?
Even a documentation link will be really helpful.
Here is an example of hosted singed xpi file
https://dl.dropboxusercontent.com/u/71743966/requestly/firefox/requestly-4.1.6-an%2Bfx.xpi2
When I open this link in Firefox, it says
Firefox prevented this site from asking you to install this software.
How can I fix this problem ? I even asked this question on Mozilla discourse but no luck.
Here is my manifest.json
{
"name": "Requestly",
"version": "4.1.6",
"manifest_version": 2,
"description": "Mozilla Firefox addon to modify HTTP requests (Redirect | Cancel | Replace | Modify Headers)",
"updateURL": "https://dl.dropboxusercontent.com/u/71743966/requestly/firefox/update_manifest",
"updateLink": "https://dl.dropboxusercontent.com/u/71743966/requestly/firefox/requestly-4.1.6.xpi",
"content_scripts": [
{
"matches": [ "*://web.requestly.in/*" ],
"css": [ "src/pages/generated/css/main.css" ],
"js": [ "src/pages/generated/js/libs.js", "src/pages/generated/js/main.js" ]
}
],
"background": {
"scripts": [
"browser_config.js",
"src/background/storageService.js",
"src/Shared/shared.js",
"src/Shared/utils.js",
"src/background/background.js"
]
},
"browser_action": {
"default_icon": "resources/images/128x128.png",
"default_title": "Modify HTTP/HTTPS requests"
},
"icons": {
"16": "resources/images/19x19.png",
"128": "resources/images/128x128.png"
},
"permissions": [
"contextMenus",
"storage",
"webRequest",
"webRequestBlocking",
"tabs",
"http://*/*",
"https://*/*"
]
}
You need to create an HTML page and installation can only be triggered with user's manual click. Opening the link of xpi file directly does not allow users to install the addon.
So I created a simple HTML page like this:
<html>
<head></head>
<body>
<center>Install Requestly on Firefox</center>
<a href="https://dl.dropboxusercontent.com/u/71743966/requestly/firefox/requestly-4.1.6-an%2Bfx.xpi"> Click here on download </a>
</body>
</html>
After hosting this page and clicking on download link actually installed the addon in Firefox v49.