Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion services/image/src/routes/ipfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
})
}
}

Expand Down
1 change: 1 addition & 0 deletions services/image/src/utils/ipfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export async function fetchIPFS({ path }: { path: string }) {

const gateways: HTTPS_URI[] = [
ipfsProviders.ipfs,
ipfsProviders.dweb,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ipfsProviders.dweb,
ipfsProviders.w3s,

ipfsProviders.filebase_kodadot,
]

Expand Down