When using things such as riot (matrix client) that rely on the domain to separate logins it gets very annoying to have to turn off ipfs-companion to avoid redirection to the local gateway (which would cause riot to use a completely different account than when it's served from the intitial domain).
It would be nice to be able to blacklist certain domains from being redirected to the local gateway.
This sounds useful and easy to add.
Would appreciate some feedback:
I think the preferences screen is suitable, and maybe "Gateway redirect blacklist"?
Maybe while you're at it add an option for whitelist as well? The user would then have radio buttons for choosing between "Filter: None, Blacklist, Whitelist".
I think a button in the popup saying "Don't use local gateway" that when toggled adds a line to a textarea in the _Preferences_ screen. i think this is somewhat like what uBlock Origin does.
When IPFS times out, the user should be prompted to temporarily disable it for the current domain (24 hours?) and be redirected back to the web version.
Privacy Badger as a prior art:
I think the second button is quite valuable. We could enable it on Beta channel only, and make it open https://github.com/ipfs/ipfs-companion/issues/new with site URL pre-filled in description.
Note to self:
As noted in #662, subresources are easy to detect, and can be linked to specific "parent URL". We can apply rules of the root document to all sub-resources, even if those are loaded from different Origins. For example, if we disable redirect for d.tube, it should be disabled for d.tube but also iframes loaded from emb.d.tube and third party hostnames foo.bar.buzz.tld, solving the problem of "breaking DTube".
Research how feasible is an experiment to make global exception for image, audio and video sub-resources by looking at ResourceType
WIP in https://github.com/ipfs-shipyard/ipfs-companion/pull/687 – just pushed the first stab at UX, would appreciate feedback, thanks!
Ready for testing: v2.7.5.748 (Beta)
Most helpful comment
I think a button in the popup saying "Don't use local gateway" that when toggled adds a line to a textarea in the _Preferences_ screen. i think this is somewhat like what uBlock Origin does.