You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
URI router: https://dweb.link/ipfs/?uri={ipfs:// uri} endpoint for navigator/registerProtocolHandler redirects to generic content path like https://dweb.link/ipfs/{cid}
subdomain router: https://dweb.link/ipfs/{cid} redirects to isolated origin at https://{cid}.ipfs.dweb.link
dir normalization: when a CID or a path points at a unixfs directory node, and the path does not end with / gateway returns redirect to URL with / suffix. This is both security (scoping service workers etc) and UX feature.
Returning 301 is may "just work" the spec remains ambiguous, and that may not be compatible with the idea of a "writable" gateway (ipfs/in-web-browsers#180, protocol/web3-dev-team#1) because it does not guarantee the POST request won't be changed to GET.
IIUC this should be a fairly easy fix: replace every place we use 301 with 308.
No change in functionality (HTTP clients operating on GET won't see any difference), but makes things more future-proof.
Caveat*: IE11 on Windows 7 may be a problem, and we should not ship unless the impact is mitigated or acceptable.
The text was updated successfully, but these errors were encountered:
Potential problem in the future
We use HTTP 301 redirects all over the place:
https://dweb.link/ipfs/?uri={ipfs:// uri}
endpoint for navigator/registerProtocolHandler redirects to generic content path likehttps://dweb.link/ipfs/{cid}
https://dweb.link/ipfs/{cid}
redirects to isolated origin athttps://{cid}.ipfs.dweb.link
/
gateway returns redirect to URL with/
suffix. This is both security (scoping service workers etc) and UX feature.Returning 301 is may "just work" the spec remains ambiguous, and that may not be compatible with the idea of a "writable" gateway (ipfs/in-web-browsers#180, protocol/web3-dev-team#1) because it does not guarantee the
POST
request won't be changed toGET
.Fix
IIUC this should be a fairly easy fix: replace every place we use 301 with 308.
No change in functionality (HTTP clients operating on
GET
won't see any difference), but makes things more future-proof.Caveat*: IE11 on Windows 7 may be a problem, and we should not ship unless the impact is mitigated or acceptable.
The text was updated successfully, but these errors were encountered: