gothinkster / react-redux-realworld-example-app

Exemplary real world application built with React + Redux
https://react-redux.realworld.io
MIT License
5.57k stars 2.52k forks source link

connecting react frontend deployed on StackBlitz to the backend #87

Open pbk0 opened 7 years ago

pbk0 commented 7 years ago

I deployed the django backend on Azure and then updated the URL in ajent.js (React frontend) to point to django backend. It does not proceed. Do I need to some more changes for this to work?

apai4 commented 7 years ago

Are you getting a CORS error in your browser? If so you'll need to add the StackBlitz domain (the one ending in .io) to https://github.com/gothinkster/django-realworld-example-app/blob/f2bb39548f4c6d969ff6c12c490d1e34d6331fc4/conduit/settings.py#L132

pbk0 commented 7 years ago

All settings are correct in django. I think the problem is that django backend and react frontend are on two different domains and not on the same server. But in that case, the purpose of CORS is too let that happen right? But still, I am failing to get it working.