feedbin / feedbin-api

Feedbin API Documentation
349 stars 26 forks source link

CORS issue when requesting API from webapp #48

Open Simon-JB opened 4 years ago

Simon-JB commented 4 years ago

Hello,

I'm developing an RSS Reader app using Feedbin as a backend. But I run into a lot of trouble with CORS : "Access to XMLHttpRequest at 'https://api.feedbin.com/v2/icons.json' from origin [xxx] has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource."

When running my app in Electron, it works. When running it in the browser as a progressive web app, it doesn't, in localhost but also on all servers I'm trying to upload it. I have to proxy requests through something like "https://cors-anywhere.herokuapp.com/" but obviously it's not the best option, even if I manage to route the requests through a server I own.

I guess the API is mostly dedicated to native apps, but could it be possible to somehow remove those cross-origin restrictions ?

Thanks,

Simon