1π
β
I figured out the problem eventually. The problem is the browser cache. I updated django, djago-rest-framework, react and react-router-dom. Then I did a hard reload
of the localhost:3000 website and it eventually started working. The key point is to clear the browser cache just after you add corsheaders
and it will work. I took help from this Question
π€Animesh Kumar
0π
Itβs because of the CORS policy. Even if you allow the sites in the settings, you need to explicitly enable those websites to access content from your backend. Install cors headers app in Django and set the allowed origins. The documentation for cors headers
has sufficient information.
π€Abhinav Dev
- [Answered ]-Django NameError: name ' ' is not defined
- [Answered ]-Tune queryset.get for working without DoesNotExist exception in model's Manager
- [Answered ]-How to send message from django server to a nodejs server and receive the reply?
- [Answered ]-"Business is not iterable" error returning data on same HTML page as form
- [Answered ]-How to get Uwsgi working with wagtail (django)
Source:stackexchange.com