Django 301 redirect problem with React
The answer is: ‘/’ Sometimes when you change your client-side code, and suddenly you experience a 301 redirect response from your server-side. In my case, I was using Django as a serverside and use ReactJS as a client-side. The API was implemented in a RESTful style. Most of the cases, the reason was I forgot to end with ‘/’ in my request URL. (Good) https://api.example.com/api/100/ (Bad) https://api.example.com/api/100 I haven’t really investigated what is behind this rule but, don’t panic and…