ipfs-webui icon indicating copy to clipboard operation
ipfs-webui copied to clipboard

Change default gateway for shareable links?

Open amackenzie opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe. Currently, the shareable links default to using ipfs.io to resolve the content. It would be nice if we were able to set which gateway we'd like to use (whether another public gateway or our own).

Describe the solution you'd like Ideally, there's a box somewhere I can enter a gateway URL to be used whenever I copy from a shareable link.

amackenzie avatar Jan 28 '21 04:01 amackenzie

This is a good idea.

  • MVP: define default gateway URL in the config file (src/common/store.js) and use value from the config when copying link
  • Better: allow user to set value in config via UI (prompt for gateway URL + validate it is correct by loading test CID and comparing payload)

I'm happy to review a PR if someone wants to take a stab at this.

lidel avatar Jan 28 '21 19:01 lidel

@amackenzie In the meantime, you can specify public gateway (for your own fallback, and for shareable links) in IPFS Companion's prefs. image

jessicaschilling avatar Jan 28 '21 19:01 jessicaschilling

(moving to ipfs-webui repo, since this work would happen upstream)

jessicaschilling avatar Jan 28 '21 19:01 jessicaschilling

MVP here would be to allow override via localStorage (so ipfs-companion can control used gateway):)

window.localStorage.setItem('ipfsPublicGateway', 'https://cf-ipfs.com')

Nice to have: add UI for setting this via Settings screen. PRs welcome!

lidel avatar Jul 30 '21 13:07 lidel

This is possible via the settings screen:

Image

Closing

SgtPooki avatar Dec 05 '22 21:12 SgtPooki