The JSON API should support Cross-Origin Requests because the API is potentially useful in the browser. JSONP support would also work.
Recreating the issue:
Try running the following in your browser's JS Console on a site other than https://iconbin.com/
fetch("https://iconbin.com/api/instagram.com")
.then(function(res){
return res.json();
})
.then(function(data){
// `data` will never be resolved due to
// the Cross-Origin Request policy.
console.log(data);
})
Solution
Add the CORS headers to the routes in the Express app. Then requests can be made like this
The JSON API should support Cross-Origin Requests because the API is potentially useful in the browser. JSONP support would also work.
Recreating the issue:
Try running the following in your browser's JS Console on a site other than https://iconbin.com/
Solution
Add the CORS headers to the routes in the Express app. Then requests can be made like this