Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gateway): _redirects file support #8890

Merged
merged 54 commits into from
Sep 23, 2022
Merged

feat(gateway): _redirects file support #8890

merged 54 commits into from
Sep 23, 2022

Commits on Sep 22, 2022

  1. WIP _redirects support

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    5ae4e4e View commit details
    Browse the repository at this point in the history
  2. Handle forced redirects

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    937e998 View commit details
    Browse the repository at this point in the history
  3. Return 404 where we did previously

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    7145efc View commit details
    Browse the repository at this point in the history
  4. Remove go.mod replace

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    7f13047 View commit details
    Browse the repository at this point in the history
  5. Remove log statements based on CodeQL results

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    748a6ea View commit details
    Browse the repository at this point in the history
  6. Add missing test_kill_ipfs_daemon to sharness

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    ab87d10 View commit details
    Browse the repository at this point in the history
  7. Deps changes

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    acd5d1a View commit details
    Browse the repository at this point in the history
  8. Comment cleanup

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    8958efe View commit details
    Browse the repository at this point in the history
  9. Any path resolution errors mean the file doesn't exist

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    f79b4b4 View commit details
    Browse the repository at this point in the history
  10. WIP comments

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    99720d2 View commit details
    Browse the repository at this point in the history
  11. Check for root path CID before joining with _redirects

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    fc617bf View commit details
    Browse the repository at this point in the history
  12. DNSLink test

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    1f86713 View commit details
    Browse the repository at this point in the history
  13. Comments

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    5d59ce9 View commit details
    Browse the repository at this point in the history
  14. Fix placeholder and splat usage for 200 and 404

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    3cfb84e View commit details
    Browse the repository at this point in the history
  15. go mod tidy

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    56db72e View commit details
    Browse the repository at this point in the history
  16. Move test case to car file

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    0e2a3a8 View commit details
    Browse the repository at this point in the history
  17. Update CAR file and test after updating CAR file for spec

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    2e4357b View commit details
    Browse the repository at this point in the history
  18. go mod tidy

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    6fcca56 View commit details
    Browse the repository at this point in the history
  19. Use type for context.WithValue, per docs

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    08ddc07 View commit details
    Browse the repository at this point in the history
  20. More types

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    babb6ad View commit details
    Browse the repository at this point in the history
  21. Remove forced redirect support, to avoid the performance hit

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    6830b1b View commit details
    Browse the repository at this point in the history
  22. Use justincjohnson/go-ipfs-redirects, which I'll switch to the ipfs o…

    …rg once officially moved.
    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    4d9bddf View commit details
    Browse the repository at this point in the history
  23. Switch to github.com/ipfs-shipyard/go-ipfs-redirects

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    d2e6106 View commit details
    Browse the repository at this point in the history
  24. Address feedback, correct car fixture

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    3a614ef View commit details
    Browse the repository at this point in the history
  25. More feedback

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    f66d64b View commit details
    Browse the repository at this point in the history
  26. More feedback

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    bb94374 View commit details
    Browse the repository at this point in the history
  27. go mod tidy

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    2acbf70 View commit details
    Browse the repository at this point in the history
  28. Fix test

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    f4cf5a6 View commit details
    Browse the repository at this point in the history
  29. Error early if invalid status

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    46faca8 View commit details
    Browse the repository at this point in the history
  30. Confirm CRLF line terminator

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    f9cd964 View commit details
    Browse the repository at this point in the history
  31. Add tests for invalid _redirects file

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    5153b9a View commit details
    Browse the repository at this point in the history
  32. Add test with attempted forced redirect

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    0570b1d View commit details
    Browse the repository at this point in the history
  33. Simplify getRootPath by using ipath.Path

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    f4b9ec2 View commit details
    Browse the repository at this point in the history
  34. Consolidate unixfs and non-unixfs handling into a single method.

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    3cd0c6d View commit details
    Browse the repository at this point in the history
  35. Remove direct dependency on ucarion/urlpath

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    4c8ccbd View commit details
    Browse the repository at this point in the history
  36. go mod tidy

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    4282785 View commit details
    Browse the repository at this point in the history
  37. Cleanup after rebase

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    b299f81 View commit details
    Browse the repository at this point in the history
  38. Revert unnecessary downgrade of a dep

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    cf2ae8c View commit details
    Browse the repository at this point in the history
  39. go mod tidy

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    2495b8d View commit details
    Browse the repository at this point in the history
  40. function rename, per lidel

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    825fc1e View commit details
    Browse the repository at this point in the history
  41. Switch from github.com/ipfs-shipyard/go-ipfs-redirects to github.com/…

    …ipfs/go-ipfs-redirects-file
    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    24d248c View commit details
    Browse the repository at this point in the history
  42. Move status code validation logic to github.com/ipfs/go-ipfs-redirect…

    …s-file
    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    9778197 View commit details
    Browse the repository at this point in the history
  43. fix comment, in part to avoid inconsistent go fmt issue with 1.19

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    6334c5a View commit details
    Browse the repository at this point in the history
  44. Update comment

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    f25ed84 View commit details
    Browse the repository at this point in the history
  45. Fix test to match new output with status code parsing happening in go…

    …-ipfs-redirects-file
    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    5b6d7e2 View commit details
    Browse the repository at this point in the history
  46. Add test for max file size

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    38ac69d View commit details
    Browse the repository at this point in the history
  47. Refactor as requested in review

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    2a7b0b6 View commit details
    Browse the repository at this point in the history
  48. Missing changes from lidel

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    462cd1a View commit details
    Browse the repository at this point in the history
  49. fix go mod tidy error in ci

    Justin Johnson authored and lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    8bfa333 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    eb7138d View commit details
    Browse the repository at this point in the history
  51. refactor: move handlePathResolution

    - this function is core to all response types, does not belong to
      _redirects specific file
    - small improvements that improve readability and remove surface for
      bugs
    lidel committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    0ae8545 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2022

  1. Serve custom 410 and 451 pages as well

    Justin Johnson committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    a9a0658 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e18d6c7 View commit details
    Browse the repository at this point in the history
  3. refactor: move serveLegacy404IfPresent

    Reduce noise by moving legacy redirect logic to *redirects.go
    lidel committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    907dc6d View commit details
    Browse the repository at this point in the history