Closed lidel closed 7 months ago
?uri= router (specs) used in some browser contexts is broken, probably due to bad bits trying to parse ?uri= as identifier:
?uri=
https://dweb.link/ipfs/?uri=ipfs%3A%2F%2Fbafybeicojl6bm5fa5lxr4fluhdsc2lhj5nkanb5vo4dg7vjdiwbkhgy5qu
@ns4plabs if I got this right, a potential fix is to bypass badbits for requests to paths that start with, and let rainbow handle them:
https://dweb.link/ipfs/?uri=
https://dweb.link/ipns/?uri=
It is safe to do as these will redirect to proper subdomain where bad bits will be correctly applied:
$ curl "http://localhost:8080/?uri=ipfs%3A%2F%2Fbafybeicojl6bm5fa5lxr4fluhdsc2lhj5nkanb5vo4dg7vjdiwbkhgy5qu" -i HTTP/1.1 301 Moved Permanently Content-Type: text/html; charset=utf-8 Location: /ipfs/bafybeicojl6bm5fa5lxr4fluhdsc2lhj5nkanb5vo4dg7vjdiwbkhgy5qu Date: Wed, 07 Feb 2024 22:26:53 GMT Content-Length: 100 <a href="/ipfs/bafybeicojl6bm5fa5lxr4fluhdsc2lhj5nkanb5vo4dg7vjdiwbkhgy5qu">Moved Permanently</a>.
?uri=
router (specs) used in some browser contexts is broken, probably due to bad bits trying to parse?uri=
as identifier:https://dweb.link/ipfs/?uri=ipfs%3A%2F%2Fbafybeicojl6bm5fa5lxr4fluhdsc2lhj5nkanb5vo4dg7vjdiwbkhgy5qu
@ns4plabs if I got this right, a potential fix is to bypass badbits for requests to paths that start with, and let rainbow handle them:
https://dweb.link/ipfs/?uri=
https://dweb.link/ipns/?uri=
It is safe to do as these will redirect to proper subdomain where bad bits will be correctly applied: