feat: support dag-json and dag-cbor preview rendering#68
Merged
Conversation
dag-json and dag-cbor preview rendering
alanshaw
pushed a commit
that referenced
this pull request
Sep 10, 2025
🤖 I have created a release *beep* *boop* --- ## [5.2.0](v5.1.3...v5.2.0) (2025-09-10) ### Features * support `dag-json` and `dag-cbor` preview rendering ([#68](#68)) ([19274ec](19274ec)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's a source of confusion that the Storacha gateway redirects to dweb.link for
dag-cboranddag-jsoncontent. This is particularly highlighted when IPNI is down and dweb.link is not able to pull data from our gateway - it appears as though customer data is unavailable. However this is not the case - the data is available over bitswap and via specifying?format=rawin the querystring but freeway simply does not know how to render a preview HTML page for the data so it responds with 501, causing the redirect behaviour.This PR adds a preview HTML page for
dag-cboranddag-jsonthat is very similar to the HTML page displayed by ipfs.io and dweb.link for these kinds of data.I have also updated a few URLs from ipfs.io to ipfs.tech and added an optional parameter to the handlers allowing the
gatewayDomainto be set (which ensures resources can be fetched from the same domain as the page is served from).resolves #28