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

fix: allow ipfs-companion browser extension to access RPC API #8690

Merged

Conversation

meandavejustice
Copy link
Contributor

@meandavejustice
Copy link
Contributor Author

cc/ @lidel

@BigLep BigLep requested a review from lidel March 10, 2022 08:16
@BigLep BigLep added this to the Best Effort Track milestone Mar 10, 2022
@meandavejustice meandavejustice force-pushed the feat/add-companion-id-to-allowed-origins branch from a565133 to 7978e05 Compare March 16, 2022 17:07
- fixes ipfs#8689
- Adds the chrome-extension ids for ipfs-companion and
ipfs-companion-beta to the allowed origins list, this
allows us to accesss ipfs api from a manifest v3 extension.
- added tests in t0401-api-browser-security.sh
@meandavejustice meandavejustice force-pushed the feat/add-companion-id-to-allowed-origins branch from 7978e05 to c48b612 Compare March 16, 2022 17:12
@lidel lidel modified the milestones: Best Effort Track, go-ipfs 0.13 Mar 16, 2022
@lidel lidel changed the title fix: add companion ids to allow origins fix: allow ipfs-companion browser extension to access RPC API Mar 16, 2022
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. I'll add tests to confirm this still works when one defined own CORS safelist.

This ensures we don't break common use cases:

  • users of ipfs-desktop: it adds own CORS entries
  • users of webui.ipfs.io (bleeding edge version) who manually added it to CORS safelist
  • webui developers, who safelist localhost Origins for local dev

Companion extension should be able to access RPC API even when custom
Access-Control-Allow-Origin is set
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 this pull request may close these issues.

Add ipfs-companion chrome extension id to accepted origins for future manifest v3 version
3 participants