Created
July 3, 2015 14:11
-
-
Save paltman/490049a64fa4115a2cea to your computer and use it in GitHub Desktop.
override axios default csrf header and cookie name to match what Django expects
This file contains 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
var axios = require("axios"); | |
var axiosDefaults = require("axios/lib/defaults"); | |
axiosDefaults.xsrfCookieName = "csrftoken" | |
axiosDefaults.xsrfHeaderName = "X-CSRFToken" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment