diff --git a/services/image/src/routes/ipfs.ts b/services/image/src/routes/ipfs.ts index d1f532c..9ef75dd 100644 --- a/services/image/src/routes/ipfs.ts +++ b/services/image/src/routes/ipfs.ts @@ -48,7 +48,15 @@ app.get('/*', async (c) => { }) if (publicUrl) { - return c.redirect(publicUrl, 301) + return fetch(publicUrl, { + cf: { + cacheTtlByStatus: { + '200-299': CACHE_DAY, + '404': 0, + '500-599': 0, + }, + }, + }) } } diff --git a/services/image/src/utils/ipfs.ts b/services/image/src/utils/ipfs.ts index 2bc6423..e5c15ef 100644 --- a/services/image/src/utils/ipfs.ts +++ b/services/image/src/utils/ipfs.ts @@ -39,6 +39,7 @@ export async function fetchIPFS({ path }: { path: string }) { const gateways: HTTPS_URI[] = [ ipfsProviders.ipfs, + ipfsProviders.dweb, ipfsProviders.filebase_kodadot, ]