I set it in /usr/share/applications/defaults.list
and it worked for me (opening links from the Slack app).
Indeed, the list of available applications is /usr/share/applications/\*.desktop
.
This can probably also be done per-user in ~/.config/mimeapps.list
These lines had to be edited in my case:
text/html=firefox.desktop;
text/xml=firefox.desktop;
application/xhtml_xml=firefox.desktop;
image/webp=firefox.desktop;
x-scheme-handler/http=firefox.desktop;
x-scheme-handler/https=firefox.desktop;
x-scheme-handler/ftp=firefox.desktop;
https://unix.stackexchange.com/posts/572176/edit