ipfs-postmsg-proxy
ipfs-postmsg-proxy copied to clipboard
Support explicit whitelist of exposed APIs
trafficstars
Originated from https://github.com/ipfs-shipyard/ipfs-companion/issues/478
Summary
There are contexts in which we don't want to expose sensitive APIs such as name.publish or config.
TODO
- For now we can throw an error in
prehook provided tocreateProxyServer, but ideally only whitelisted APIs should be exposed viawindow.ipfs. - (optional, nice to have) We should add a method
window.ipfs.availableApiswhich just exposes a list of available function names.