Skip to content

feat(gw): expose /api/v0/dag/export on gateway port#8111

Merged
aschmahmann merged 2 commits into
masterfrom
dag-export-is-read-only
May 5, 2021
Merged

feat(gw): expose /api/v0/dag/export on gateway port#8111
aschmahmann merged 2 commits into
masterfrom
dag-export-is-read-only

Conversation

@olizilla

@olizilla olizilla commented May 5, 2021

Copy link
Copy Markdown
Member
  • 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 oli@tableflip.io

- 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 <oli@tableflip.io>
@olizilla

olizilla commented May 5, 2021

Copy link
Copy Markdown
Member Author

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

@lidel lidel left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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