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

use a regex (based on the current multihash) to detect a gateway #90

Merged
merged 3 commits into from
Jan 25, 2016
Merged

use a regex (based on the current multihash) to detect a gateway #90

merged 3 commits into from
Jan 25, 2016

Conversation

Mithgol
Copy link

@Mithgol Mithgol commented Jan 24, 2016

Here's a temporary solution (until some solution for ipfs/notes#92 is provided) to decide if the second part of window.location.pathname looks like the current IPFS multihash.

@fazo96
Copy link
Owner

fazo96 commented Jan 24, 2016

Thanks! However, it also needs to support IPNS using DNS (for example, /ipns/ipfs.io) but other than this, it's quite an improvement.

@Mithgol
Copy link
Author

Mithgol commented Jan 24, 2016

I've updated the regexp to support domain names after /ipns/.

(All of the modern IDN make it almost impossible to create a detailed regexp for a domain name and thus I've used the most simple something-dot-something form of [^.]+\.[^.]+ for domain names.)

@fazo96
Copy link
Owner

fazo96 commented Jan 24, 2016

Very well! I'll merge this as soon as I'm able to 😄

fazo96 added a commit that referenced this pull request Jan 25, 2016
use a regex (based on the current multihash) to detect a gateway
@fazo96 fazo96 merged commit a28e6e1 into fazo96:ipfs0.4 Jan 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants