diff --git a/src/utils.tsx b/src/utils.tsx index 2d644c2..ea9bfad 100644 --- a/src/utils.tsx +++ b/src/utils.tsx @@ -68,7 +68,7 @@ function ipfsUrlDefault(cid: string, path = ""): string { return `https://ipfs.io/ipfs/${cid}${path}` } -const IPFS_PROTOCOL_RE = /^ipfs:\/\/ipfs\/([^/]+)(\/.+)?$/ +const IPFS_PROTOCOL_RE = /^ipfs:\/\/(?:ipfs\/)?([^/]+)(\/.+)?$/ const IPFS_HASH_RE = /^Qm[1-9A-HJ-NP-Za-km-z]{44}$/ export function ipfsUrl(