Skip to content

Commit 445f213

Browse files
authored
fix: disable cors by default (#3275)
Co-authored-by: Marcin Rataj <[email protected]> Brings js-ipfs into line with go-ipfs by not having CORS on by default, instead requiring the user to explicitly configure it. BREAKING CHANGE: - CORS origins will need to be [configured manually](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs-http-client/README.md#cors) before use with ipfs-http-client
1 parent e75d39c commit 445f213

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,8 @@ $ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://exam
342342
$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST", "GET"]'
343343
```
344344

345+
If you are using `js-ipfs`, substitute `ipfs` for `jsipfs` in the commands above.
346+
345347
### Custom Headers
346348

347349
If you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so:

0 commit comments

Comments
 (0)