-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improved support for remote API (#1613)
* feat: improved support for remote API This change adds support for connecting to remote API that is protected by HTTP Basic Auth and enables entering custom configuration as a hidden feature for advanced users. Terse summary: - custom API address is stored in and read from localStorage[ipfsApi] - ipfsApi is a string or null - if ipfsApi is null, ipfs-provider will try default /ip4/127.0.0.1/tcp/5001 and same-origin - ipfsApi tring can be multiaddr, URL or a JSON with constructor config for ipfs-http-client - user can enter URL with inlined basic auth user and password, we convert them to advanced config before passing to http client. - E2E tests for using remote API with basic auth (URL or JSON, by setting localStorage[ipfsApi] or via Settings screen) * fix: hide JSON when custom API config is used #1613 (comment) * testi(e2e): multiaddr and JSON API address * test(e2e): API set to multiaddr and URL This makes tests DRY and adds regression tests for API set to multiaddr and regular URL in addition to existing basic auth JSON/URL. * chore: ipfs-provider 1.1.0 This update ensures that if user passes a custom config for ipfs-http-client, the object is not mutated by the http client. * refactor: avoid redundant JSON serialization This removes double JSON serialization, as noted in #1613 (comment) and cleans up a bunch of tests to only use documented config keys for ipfs-http-client.
- Loading branch information
Showing
10 changed files
with
1,026 additions
and
339 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.