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

[Web] Ship web app with IPFS #1521

Closed
2 of 5 tasks
guoliu opened this issue Sep 21, 2020 · 0 comments · Fixed by #1493
Closed
2 of 5 tasks

[Web] Ship web app with IPFS #1521

guoliu opened this issue Sep 21, 2020 · 0 comments · Fixed by #1493
Assignees

Comments

@guoliu
Copy link
Contributor

guoliu commented Sep 21, 2020

Is your feature request related to a problem? Please describe.
After we moved to JAMstack, we can now utilize Next.js's static export functionality and ship the web app to users with IPFS. The web app will function as a SPA, and still fetch data from server.

  • Configure Next.js for static export.
  • Store and retrieve token from localStorage when transporting via IPFS, since cookie are restricted by domain.
  • Solve CORS restriction for API calls when transporting via IPFS
  • Pin webapp on IPFS network, self-hosted or via Pinata
  • Update DNSLink of matters.news

Note on CORS restriction for API calls when transporting via IPFS:

Our server currently only allows localhost and *.matters.news domain for browser access, so browsers block API calls when initiated from IPFS public gateway. We can either relax the CORS restrictions on backend (security implications uncertain), or we can setup a lambda function that act as a proxy to our server (similar to this example). The later has the additional benefit of masking the traffic to our server.

@guoliu guoliu self-assigned this Sep 21, 2020
@guoliu guoliu linked a pull request Sep 21, 2020 that will close this issue
@guoliu guoliu reopened this Sep 22, 2020
@devformatters devformatters changed the title Ship web app with IPFS [Web] Ship web app with IPFS Jul 28, 2022
@guoliu guoliu closed this as completed Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant