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: integrate with @crossbell/ipfs-gateway #6

Merged
merged 4 commits into from
Sep 8, 2022
Merged

Conversation

runjuu
Copy link
Member

@runjuu runjuu commented Sep 6, 2022

@crossbell/ipfs-gateway-next

A Next.js plugin. It is used to serve a static file that service worker needs. It also provides a fallback strategy to handle /_ipfs/{cid} request which just redirects the request to other valid gateways.

@crossbell/ipfs-gateway

Including service worker registration and some helper methods.

@crossbell/ipfs-react

Provide first class ipfs-gateway support for react ecosystem 🤡.

@runjuu runjuu requested a review from Songkeys September 6, 2022 13:33
@vercel
Copy link

vercel bot commented Sep 6, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
xlog ✅ Ready (Inspect) Visit Preview Sep 8, 2022 at 5:00PM (UTC)

@DIYgod
Copy link
Member

DIYgod commented Sep 6, 2022

Is this feature still under development or has been completed?

@runjuu runjuu marked this pull request as ready for review September 7, 2022 02:27
@runjuu runjuu changed the title [WIP] feat: integrate with @crossbell/ipfs-gateway feat: integrate with @crossbell/ipfs-gateway Sep 7, 2022
@runjuu
Copy link
Member Author

runjuu commented Sep 7, 2022

The feature has been completed, but related README has not 😅. It should be ok to merge, I think.

@DIYgod
Copy link
Member

DIYgod commented Sep 7, 2022

I found two problems

  1. the server cannot access the _ipfs path, one option is to have the server access the normal gateway
  2. it always falls back to cf-ipfs under the subdomain, you can locally run pnpm dev and then visit http://diygodbest.localhost:3000/ to see

runjuu and others added 4 commits September 8, 2022 21:27
- `Unidata` will use default gateway when running at server side.
- `toGateway` adds an option `needRequestAtServerSide` to return a valid gateway for server side usage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants