Closed achingbrain closed 8 months ago
:tada: This PR is included in version 1.1.0 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:
:tada: This PR is included in version 1.3.0 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:
:tada: This PR is included in version 1.0.0 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:
:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Adds support for simulating redirects for UnixFS directories.
We're somewhat in uncharted water here because
window.fetch
does this transparently unless you specify a redirect option, none of which actually allow you to manually follow a redirect.The states we can be in are:
ipfs://QmFoo/dir/
response.redirected = false
response.url = 'ipfs://QmFoo/dir'
2: URL:
ipfs://QmFoo/dir
,redirect: 'follow'
response.redirected = true
response.url = 'ipfs://QmFoo/dir/'
3: URL:
ipfs://QmFoo/dir
,redirect: 'error'
TypeError('Failed to Fetch')
same aswindow.fetch
4: URL:
ipfs://QmFoo/dir
,redirect: 'manual'
response.redirected = false
response.url = 'ipfs://QmFoo/dir
response.headers.get('location') = 'ipfs://QmFoo/dir/'
Number 4 is the furthest from the fetch spec but to follow the spec would make it impossible to actually follow a redirect.
Refs: https://github.com/ipfs-shipyard/helia-service-worker-gateway/issues/62
Change checklist