[Django]-403 error code when using axios.post to Django endpoint in React app

10👍

Simply, set the below settings. Nothing else is required.

axios.defaults.xsrfCookieName = 'csrftoken';
axios.defaults.xsrfHeaderName = 'X-CSRFToken';
👤Vishal

Leave a comment