lidel
August 18, 2022, 9:55pm
1
There is an open proposal to add support for _redirects
file in contexts that provide origin isolation for web browsers, championed by @justincjohnson .
Specification added by below IPIP includes explainer and test fixtures:
ipfs:main
โ justincjohnson:feat/gateway-redirects
opened 09:15PM - 15 Jun 22 UTC
> This is part of https://github.com/ipfs/specs/issues/257, working code in httpโฆ s://github.com/ipfs/kubo/pull/8890
๐ Preview
- [IPIP - 0002-gateway-redirects.md](https://github.com/justincjohnson/specs/blob/feat/gateway-redirects/IPIP/0002-gateway-redirects.md)
- [Spec - REDIRECTS_FILE.md](https://github.com/justincjohnson/specs/blob/feat/gateway-redirects/http-gateways/REDIRECTS_FILE.md)
- [HTTP Gateways - README.md](https://github.com/justincjohnson/specs/blob/feat/gateway-redirects/http-gateways/README.md)
For reference, working code in Kubo PR: https://github.com/ipfs/kubo/pull/8890
There is also working implementation in Kubo:
ipfs:master
โ justincjohnson:justincjohnson/redirects
opened 03:09PM - 15 Apr 22 UTC
> Context: https://github.com/ipfs/specs/pull/290, part of https://github.com/iโฆ pfs/specs/issues/257
This PR implements https://github.com/ipfs/specs/pull/290.
### Details
Now that https://github.com/ipfs/go-ipfs/pull/8885 has landed, I've moved my refactored `_redirects` changes here from https://github.com/ipfs/go-ipfs/pull/8816. This is on my personal account now, so the CircleCI permission issues should be resolved. ๐
@lidel, as mentioned at https://github.com/ipfs/go-ipfs/pull/8816#issuecomment-1091022658, there are some challenges with trying to fully move `_redirects` logic out of `gateway_handler.go` as you requested. The changes in this PR aren't ready (full review not needed yet), but would you be able to take a look and let me know if you approve of how I've split code into `handleUnixfsPathResolution` and `handleNonUnixfsPathResolution`?
Also, note that I've intentionally not moved 404 related functions from `gateway_handler.go` to `gateway_handler_unixfs__redirects.go` yet, to avoid extra PR noise.
Feedback on both will be appreciated.
2 Likes
lidel
October 6, 2022, 10:02pm
2
1 Like