# API exposure in order to allow add\*

**URL:** <https://discuss.ipfs.tech/t/api-exposure-in-order-to-allow-add/4941>\
**Category:** Kubo\
**Created:** [February 27, 2019, 9:52pm UTC](https://discuss.ipfs.tech/t/api-exposure-in-order-to-allow-add/4941 "2019-02-27T21:52:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![guix77](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/guix77/32/2337_2.png) [@guix77](https://discuss.ipfs.tech/u/guix77)\
**Post date:** [February 27, 2019, 9:52pm UTC](https://discuss.ipfs.tech/t/api-exposure-in-order-to-allow-add/4941/1 "2019-02-27T21:52:06Z")

</div>

Hi,

There’s something I don’t get.

By default we have in the config:

`"API": "/ip4/127.0.0.1/tcp/5001",`

And on [https://docs.ipfs.io/guides/examples/config/](https://docs.ipfs.io/guides/examples/config/) it is advised not to change it:

> You should ensure that this address is not dialable from outside of your machine, or other potentially malicious parties may be able to send commands to your ipfs daemon.

1. How exactly are we supposed to use _the parts of the API_ useful to upload content from our dApps ? Like all the add\* methods on [GitHub - ipfs-inactive/js-ipfs-http-client: [ARCHIVED] now part of the https://github.com/ipfs/js-ipfs repo](https://github.com/ipfs/js-ipfs-http-client#files) ? Is there a way to expose only a subset of the API ?
2. How does Infura do? They seem to expose only a part of the API (can’t add the link because I’m a new user here, sorry)

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [February 27, 2019, 11:31pm UTC](https://discuss.ipfs.tech/t/api-exposure-in-order-to-allow-add/4941/2 "2019-02-27T23:31:57Z")

</div>

You can expose parts of the API with Nginx or any other reverse proxy sitting in front of the IPFS API.

Also, since you can run js-ipfs directly in the browser, you can probably use it to add content to the network.

Also, [IPFS Cluster](https://github.com/ipfs/ipfs-cluster) has an API which supports basic authentication (permissioned endpoints coming up soon as well). Cluster might be interesting even with a single peer because of some API features, like attaching names to pins, or any custom metadata.

---

<div class="post-metadata">

**Author:** ![guix77](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/guix77/32/2337_2.png) [@guix77](https://discuss.ipfs.tech/u/guix77)\
**Post date:** [February 28, 2019, 9:25am UTC](https://discuss.ipfs.tech/t/api-exposure-in-order-to-allow-add/4941/3 "2019-02-28T09:25:42Z")

</div>

Thank you very much Hector!
