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

Force redirection to a particular public gateway #588

Closed
rotemdan opened this issue Sep 19, 2018 · 3 comments
Closed

Force redirection to a particular public gateway #588

rotemdan opened this issue Sep 19, 2018 · 3 comments
Labels
kind/discussion Topical discussion; usually not changes to codebase

Comments

@rotemdan
Copy link

Hi, sorry if duplicate, but I couldn't find a similar issue.

Is there a way to force redirection of any IPFS link, either pointing to a localhost gateway or to a known public gateway, to a particular public gateway. For example all of:

http://127.0.0.1:8080/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
https://ipfs.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
https://www.eternum.io/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR

Would be redirected to

https://cloudflare-ipfs.com/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR

?

@lidel
Copy link
Member

lidel commented Sep 19, 2018

Sure, just put https://cloudflare-ipfs.com in "Custom Gateway URL" in Preferences

Note that if you are not running local node (no API) then you also need to disable "Automatic Mode" and manually enable redirect oto "Custom Gateway", otherwise redirect will get disabled when API is offline.

ps. May I know why you want to set it up that way? Perhaps we could provide better UI for you use case.

@lidel lidel added the kind/discussion Topical discussion; usually not changes to codebase label Sep 19, 2018
@rotemdan
Copy link
Author

rotemdan commented Sep 19, 2018

Thanks. I'm trying it out and it seems to work so far. I think the confusion was that it is named "Custom Local Gateway URL" so I assumed it wouldn't work putting a public gateway there (as, say, it possibly uses a special REST api etc.), and similarly I assumed I should use the "public" field for the public one and that there should be an option to "force" it somehow.

I guess the wording can be improved since this seems like a reasonable use case (now that there are multiple high quality public gateways available)?

@lidel
Copy link
Member

lidel commented Sep 20, 2018

Thanks, that is good feedback.
In near future we want to simplify this and just have "IPFS Backends" with different capabilities.
That should make it easier to set up redirections like yours.
(Gathering ideas in #491)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/discussion Topical discussion; usually not changes to codebase
Projects
None yet
Development

No branches or pull requests

2 participants