Created
December 20, 2017 18:29
-
-
Save krescruz/b431744b6b0e3eb6ce3892d61e837d28 to your computer and use it in GitHub Desktop.
Config Cross Site Request Forgery Protection CSRF in axios for django
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios' | |
/** | |
* Config global for axios/django | |
*/ | |
axios.defaults.xsrfHeaderName = "X-CSRFToken" | |
axios.defaults.xsrfCookieName = 'csrftoken' | |
export default axios |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment