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

fix: handle redirect from edge gateway #215

Closed vasco-santos closed 1 year ago

vasco-santos commented 1 year ago

Currently deployed to edge-gateway staging and seeing error with https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs-staging.nftstorage.link/ (error below).

This is because {w3link,nftstorage.link} interact with edge-gateway, which redirects over and over again because worker binding fetch follows redirect. Making follow manual allows us to handle this and send back redirect response to users.

I deployed this PR in w3link staging https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs-staging.w3s.link/ and is working

Too many redirects.https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs-staging.nftstorage.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/, https://bafybeiet3ym4yxqaqxbrhyvhaddi7wrglpkwoqjg5vwlsifv6duruw4vz4.ipfs.dweb.link/
cloudflare-pages[bot] commented 1 year ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 80bb26a
Status: ✅  Deploy successful!
Preview URL: https://0befe4ef.nftstorage-link.pages.dev
Branch Preview URL: https://fix-handle-redirect-from-edg.nftstorage-link.pages.dev

View logs