Closed lukechilds closed 5 years ago
I'll take a look into the best way to do this. The site is currently hosted on s3, so I should be able to follow something like this to enable CORS for the coins.json
file.
@tdickman Did you get anywhere with this?
I'm currently accessing the API via:
https://cors.io/?https://www.crypto51.app/coins.json
But it's pretty slow, doesn't make use of caching and could die at any point.
@lukechilds I just pushed up some new changes to add an api.
subdomain with cors headers enabled. You should be able to use this url now:
https://api.crypto51.app/coins.json
Perfect, thanks!
The
coins.json
endpoint can't be accessed from a browser because it doesn't have a CORS header. Add aAccess-Control-Allow-Origin: *
header will resolve the issue and allow the data to be consumed by browsers.