3box-js
3box-js copied to clipboard
Box.getProfiles fails with a CORS error on localhost
Describe the bug
When I try to call Box.getProfiles in my dev environment I get the following error:
Access to fetch at 'https://ipfs.3box.io/profileList' from origin 'http://127.0.0.1:3000' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.
To Reproduce Try to call Box.getProfiles
Expected behavior No error
Desktop (please complete the following information):
- OS: macOS Mojave
- Browser: Chrome
- Version: 78.0.3904.97
Thanks for creating a ticket for this! We are working on an update to our APIs and hopefully that will fix this. Will let you know when that is ready to see if this issue is fixed.
In the meantime using Box.getProfile should work fine :)
Are there any updates on this issue? I have the same problem
Any Updates on this?
Hello, anyway to do something for this? the OPTIONS request (called a preflight request - which is default browser behavior) doesn't go through, wich blocks any POST request.
This is a one year old ticket, could something be done about this?
@dievardump I've ended up using 3Box's Graphql API instead