I submit an ajax form in django and using
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
to get csrf_token. The mold works well in chrome. But in firefox, the csrf_token value is null and gives a 403 forbidden error. I do not get csrf_token in the console when I checked cookies in the console. Why django does not give csrf_token to firefox browser?
source share