nftstorage / nftstorage.link

🪐 NFT.Storage Gateway, the IPFS gateway for NFT.Storage is not "another gateway", but a caching layer for NFTs that sits on top of existing IPFS public gateways. ***Notice: Uploads have been decommissioned.**** Learn more and find a new hot storage provider for uploading new assets: nft.storage/nft-storage-classic
https://nft.storage/nft-storage-classic
Other
46 stars 10 forks source link

GET https://api.nftstorage.link/perma-cache/:url #101

Closed alanshaw closed 2 years ago

alanshaw commented 2 years ago

Currently the gateway is configured with the same R2 bucket that the perma cache API uses and has to know how to retrieve data from it when given a URL that was previously cached by perma cache. All this knowledge and configuration should live only in the perma-cache API and we should instead expose an API route allowing the gateway to retrieve data using just a URL.

i.e. currently:

# caching data:
user -> perma-cache -> R2
# retrieving data
user <- gateway <- R2

change to:

# caching data:
user -> perma-cache -> R2
# retrieving data
user <- gateway <- perma-cache <- R2

New API route:

GET https://api.nftstorage.link/perma-cache/:url
dchoi27 commented 2 years ago

Currently blocked on service bindings being released