samuk190 / localbase

A Firebase-Style Database ... Offline!
636 stars 84 forks source link

CORS issue with React and Localbase #55

Closed JGP84 closed 3 years ago

JGP84 commented 3 years ago

Hi Everyone!

I’ve already tried solutions from this forum, without success (which is why I’m creating this new post).

My app is just frontend (and all the solutions I've seen work from the backend).

I am trying to retrieve a base 64 image that I save with Localbase. But it throws me this error:

Access to XMLHttpRequest at 'https://thetrymysadoroh.site/cu/gmlt3.js?eid=iobnfmmhgefpdgcdpocaceafmoocljnb' from origin 'https://cmf-app.netlify.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I get my data saved like this on the frontend:

const objCardPhoto = db.collection('cardsPhotos').doc('fileUpload0').get();

My post and code in StackOverflow:

https://stackoverflow.com/questions/69036903/cors-issue-with-react-and-localbase?noredirect=1#comment122013365_69036903

Thanks to Danny for this excellent library.