rename ipfsGateway to ipfsLens

This commit is contained in:
Luk 2024-08-16 16:12:06 +08:00
parent 22d79ffc06
commit 9e41a6d203

View File

@ -146,8 +146,8 @@ module.exports = {
return route return route
} }
// 纯字母的cid // 纯字母的cid
if (/^[\da-zA-Z]+$/.test(route)) { if (/^[\da-zA-Z]+$/.test(route) && envar.ipfsLens) {
return `${envar.ipfsGateway.replace(/\/$/, '')}/${route.replace(/^\//, '')}` return `${envar.ipfsLens.replace(/\/$/, '')}/${route.replace(/^\//, '')}`
} }
//// base url / 后台服务器url 需要组装。包括了 route === '_filestore/xxx' 的情况 //// base url / 后台服务器url 需要组装。包括了 route === '_filestore/xxx' 的情况
route = route.replace(/^\//, '') route = route.replace(/^\//, '')