Skip to content

Cidv1#936

Merged
makoto merged 9 commits intodevfrom
cidv1
Oct 6, 2020
Merged

Cidv1#936
makoto merged 9 commits intodevfrom
cidv1

Conversation

@makoto
Copy link
Member

@makoto makoto commented Oct 5, 2020

Issue number

#840
ensdomains/ui#46

Screenshots (if appropriate):

Screenshot 2020-10-05 at 17 46 58

@makoto makoto merged commit f09a43e into dev Oct 6, 2020
@makoto makoto mentioned this pull request Oct 6, 2020
}
if (protocolType === 'ipfs') {
externalLink = `https://gateway.ipfs.io/ipfs/${decoded}`
externalLink = `https://${decoded}.ipfs.dweb.link` // using ipfs's secured origin gateway
Copy link

@lidel lidel Oct 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@makoto please change this to future-proof and canonical https://dweb.link/ipfs/${decoded}

  • It will redirect to canonical subdomain, pointing at the same origin no matter if custom base was used (important for cookies and local storage)
  • If someone uses CID that can't be represented as a subdomain, they will get useful error instead of DNS failure
  • It also keeps content path in URL's pathname, making it easier to copy

externalLink = `https://${decoded}.ipfs.dweb.link` // using ipfs's secured origin gateway
url = `ipfs://${decoded}`
} else if (protocolType === 'ipns') {
externalLink = `https://gateway.ipfs.io/ipns/${decoded}`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be changed to https://dweb.link/ipns/${decoded} for same reasons as https://github.com/ensdomains/ens-app/pull/936/files#r501146771

@makoto makoto mentioned this pull request Oct 7, 2020
@makoto makoto deleted the cidv1 branch October 28, 2020 14:58
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.

3 participants