Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting IPFS API address from URL parameter #947

Open
victorb opened this issue Jan 28, 2019 · 3 comments
Open

Setting IPFS API address from URL parameter #947

victorb opened this issue Jan 28, 2019 · 3 comments
Labels
exp/intermediate Prior experience is likely helpful P2 Medium: Good to have, but can wait until someone steps up

Comments

@victorb
Copy link
Member

victorb commented Jan 28, 2019

When linking to the webui from another application, it would be great if we could supply an already known API address via the URL so the user doesn't have to configure it manually.

For example, using the address http://ip:5001/ipfs/$webuiHash#ipfs-api=/ip4/10.0.0.1/tcp/5001 would automatically call the right functions to set /ip4/10.0.0.1/tcp/5001 as the API address.

Log from discussion on IRC today.

12:04:31 <@victorbjelkholm> Hello webui folks! Wondering if I can set config values for webui via the URL? For example, I want to be able to link to a webui running somewhere else that is not localhost, and I know where the ipfs endpoint is. So would be great with something like `http://ip:5001/ipfs/$webuiHash#ipfs-api=/ip4/10.0.0.1/tcp/5001` that would set the ipfs endpoint automatically on load

12:26:17 <@olizilla> victorbjelkholm: how doo! you can set config values via localStorage right now. To set it via a URL query, we'd need to tweak ipfs-redux-bundle https://github.com/ipfs-shipyard/ipfs-redux-bundle/blob/fcabfa989d33001638d57d8c1e02be29c3841850/src/js-ipfs-api/index.js
@Gozala
Copy link
Contributor

Gozala commented Feb 11, 2019

I assume this is a way to point webui to different Daemon isn't it ? I think it would be extremely useful and had being wishing for something like that in the context of ipfs/in-web-browsers#137

@olizilla olizilla added exp/intermediate Prior experience is likely helpful P2 Medium: Good to have, but can wait until someone steps up labels Feb 18, 2019
@olizilla
Copy link
Member

We can add this to ipfs-webui directly or add it to https://github.com/ipfs-shipyard/ipfs-redux-bundle which contains the "find the best IPFS you can" logic.

@calikevuche
Copy link

I have a similar question:
#1389
Is there a simple answer @olizilla @Gozala ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/intermediate Prior experience is likely helpful P2 Medium: Good to have, but can wait until someone steps up
Projects
No open projects
Status: Needs Grooming
Development

No branches or pull requests

4 participants