Problems with js-ipfs-http-client

Hello everyone!

  I had some problems when using js-ipfs-http-client, and I started to see cross-domain,
After I added the request header, there was no such problem, I thought it could be used normally,
When I called ipfs.get for the first time, I got the return value successfully, but the following
problems really bothered me, Then I want to upload a file and calling ipfs.add returns error 404.
Please tell me how can I solve it?

Have you configured the endpoint you’re trying to hit correctly? The API typically listens on port 5001.

There’s an example here: https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs-http-client/examples/files-api/files-api.js

1 Like

thank! This problem has been solved