-
Notifications
You must be signed in to change notification settings - Fork 266
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
secure ipfs gateway #538
secure ipfs gateway #538
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you really want to switch to {cid}.ipfs.dweb.link
.
It solves the problem raised in MetaMask/metamask-extension#5724 with solution from ipfs/in-web-browsers#89
Both gateway.ipfs.io
and .ipfs.dweb.link
use the same hosting, so there won't be any difference performance-wise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pldespaigne see comment inline
@@ -39,7 +39,7 @@ const ContentHashLink = ({ value, contentType }) => { | |||
return <DecodedError>{error}</DecodedError> | |||
} | |||
if (protocolType === 'ipfs') { | |||
externalLink = `https://gateway.ipfs.io/ipfs/${decoded}` | |||
externalLink = `https://${decoded}.ipfs.dweb.link` // using ipfs's secured origin gateway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
externalLink = `https://${decoded}.ipfs.dweb.link` // using ipfs's secured origin gateway | |
externalLink = `https://dweb.link/ipfs/${decoded}` // using ipfs's secured origin gateway |
@makoto
We recommend keeping the path-based router for improved compatibility.
go-ipfs 0.5+ will redirect to correct subdomain, and go-ipfs 0.7+ will even convert CID to DNS-compatible encoding, if the default is too long (eg. if ED25519 key is used in IPNS it will use Base36 to fit in a single DNS label)
Duplicate to #936 |
Hello guys 👋 @makoto @Arachnid @jefflau
I have updated the code to resolve ipfs hash trough a secure gateway.
This is a huge security improvement.
This PR has a dependency on this other PR 👇
Everything is detailed on the other PR
As always thanks a lot for your time and your work!
PS : you can read more about secure ipfs in this MetaMask PR