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

Set ipfsPublicGateway and ipfsApi when opening webui

Open lidel opened this issue 4 years ago • 0 comments

Current state

  • https://github.com/ipfs/ipfs-webui/pull/1834 introduced an optional localStorage key named ipfsPublicGateway which overrides the default URL of public gateway used in ipfs-webui (default being https://dweb.link).

  • ipfs-webui already respects ipfsApi key (if present), but Companion does not keep it in sync with own settings

Improvement

Companion should act as the source of truth. API and Gateway configured in Companion should always be explicitly set to the same value in ipfs-webui opened via Companion's "My Node' button etc.

Prior art

Companion sets ipfsApi and reloads webui (code) in Brave (which uses custom port). We could make this smarter and execute update of ipfsPublicGateway and ipfsApi every time URL in localStorage does not match one configured in Companion's Preferences.

lidel avatar Sep 01 '21 19:09 lidel