Skip to content

Commit

Permalink
we love you ipfs.io gw, but cloudflare seems more stable
Browse files Browse the repository at this point in the history
  • Loading branch information
yangwao committed Feb 10, 2021
1 parent ccdcd4d commit f591f77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dashboard/src/components/rmrk/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ export const fetchRmrkMeta = async (
export const sanitizeIpfsUrl = (ipfsUrl: string) => {
const rr = /^ipfs:\/\/ipfs/;
if (rr.test(ipfsUrl)) {
return ipfsUrl.replace('ipfs://', 'https://ipfs.io/');
return ipfsUrl.replace('ipfs://', 'https://cloudflare-ipfs.com/');
}

const r = /^ipfs:\/\//;
if (r.test(ipfsUrl)) {
return ipfsUrl.replace('ipfs://', 'https://ipfs.io/ipfs/');
return ipfsUrl.replace('ipfs://', 'https://cloudflare-ipfs.com/ipfs/');
}

return ipfsUrl;
Expand Down

0 comments on commit f591f77

Please sign in to comment.