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(gw): expose /api/v0/dag/export on gateway port #8111

Merged
merged 2 commits into from
May 5, 2021

Conversation

olizilla
Copy link
Member

@olizilla olizilla commented May 5, 2021

  • add dag/export to read-only root. it's ready only, so why the heck not!
  • test that i didn't expose other dag subcommands

License: MIT
Signed-off-by: Oli Evans [email protected]

- add dag/export to read-only root. it's ready only, so why the heck not!
- test that i didn't expose other dag subcommands
§

License: MIT
Signed-off-by: Oli Evans <[email protected]>
@olizilla
Copy link
Member Author

olizilla commented May 5, 2021

is there some magic to running a single sharness test (on macos)? I tried following the readme in the test dir but got errors.

$ make test_sharness_deps
$ cd test/sharness
$ ./t0110-gateway.sh                                                                                                                                                       15:35:40
lib/sharness/sharness.sh: line 888: syntax error: unexpected end of file
Cannot source: lib/sharness/sharness.sh
Please check Sharness installation.
FATAL: Unexpected exit with code 1

@lidel lidel changed the title feat: expose dag/export on read-only gateway api feat(gw): expose /api/v0/dag/export on gateway port May 5, 2021
@lidel lidel added this to the go-ipfs 0.9 milestone May 5, 2021
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, CI is green 🧙 ✨

This will effectively enable everyone to fetch CID from any gateway in a way that enables deterministic CID validation (ipfs/in-web-browsers#128), but without waiting for new fancy semantics discussed in ipfs/in-web-browsers#170. With this, tools like ipfs-or-gateway will be able to verify CID even when gateway is used.
We also want to explore this with Brave on mobile.

@aschmahmann I've added this to 0.9.0: this is a small and safe change that improves the utility of public gateways without opening any new doors (mind that we already expose /api/v0/refs 🤷‍♂️ ).

@lidel lidel added the topic/gateway Topic gateway label May 5, 2021
@aschmahmann
Copy link
Contributor

LGTM this seems like a pretty reasonable thing to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/gateway Topic gateway
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants